Echo "Blank lines below indicate bugs. " ; Echo "Look for inaccurate statements as well " ; Echo ---------- begin test ---------- ; VAR = 1 2 3 4 ; Echo $(VAR[2-2]) is the substring 2 ; Echo $(VAR[2]) is the same as above ; Echo $(VAR[2-3]) is the substring 2 3 ; Echo $(VAR[2-1]) there are no numbers to the left of this text ; Echo $(VAR:J=.) is the join of $(VAR) with . ; Echo $(VAR[2-]:J=.) is join of $(VAR[2-]) with . ; Echo $(VAR[2-3]:J=.) is join of $(VAR[2-3]) with . ; # works? Echo $(VAR[2-4]:J=.) is join of $(VAR[2-4]) with . ; VAR = a b c d ; Echo "Upshifts:" ; Echo $(VAR) becomes $(VAR:U) ; Echo $(VAR[2-3]) becomes $(VAR[2-3]:U) ; Echo $(VAR[2-]) becomes $(VAR[2-3]:U) ; Echo $(VAR[2-4]) becomes $(VAR[2-4]:U) ; Echo "Upshifts with joins:" ; Echo $(VAR[2-3]) becomes $(VAR[2-3]:UJ=".") ; Echo $(VAR[2-]) becomes $(VAR[2-]:UJ=".") ; Echo $(VAR[2-4]) becomes $(VAR[2-4]:UJ=".") ; Echo "X by Y: expect 4, 9 and 9 elements" ; Echo $(VAR[2-3])$(VAR[2-3]:U) ; Echo $(VAR[2-])$(VAR[2-]:U) ; Echo $(VAR[2-4])$(VAR[2-4]:U) ; Echo "Other text before and after expansion: " ; Echo pre $(VAR[1-3]) foo ; Echo pre $(VAR[1-3]:J=.) foo ; Echo "Expanding joins: blank lines are bad!" ; FOO = "carbacidometer" ; Echo $(VAR[2-]:J=$(FOO)) ; Echo $(VAR[2-4]:J=$(FOO)) ; Echo $(VAR[2-3]:J=$(FOO)) ; Echo "Indirection:" ; FOO = foo ; VAR = a b ; BAR = F O ; Echo $($(BAR:J=O)) should be $(FOO) ; BAR = FOO VAR ; Echo $($(BAR):J=.) should be $(FOO:J=.).$(VAR:J=.) ; Echo ---------- end test --------------- ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4597 | Chris Comparini | Further experiments.. | ||
#1 | 4576 | Chris Comparini |
Tests of fix to J= expansion bug posted to the Jam mailing list by Paul Forgey Oct 12 2004 Subject: [jamming] J= bug? The fix is in changelist 4575. |