summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorsjg <sjg@NetBSD.org>2003-07-29 08:16:01 +0000
committersjg <sjg@NetBSD.org>2003-07-29 08:16:01 +0000
commite3cd1dc68c7eb9a0ef7e4c3f1dfcd4cd63d3f361 (patch)
tree926e864dbdef512dd408d8152cbc375240689ae9 /usr.bin/make
parent86173c79de22990693cf4cf88d22ca8b8f1b6b5d (diff)
Use single quotes to protect everything from shell's that might
alter the results.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/unit-tests/Makefile34
-rw-r--r--usr.bin/make/unit-tests/test.exp36
2 files changed, 35 insertions, 35 deletions
diff --git a/usr.bin/make/unit-tests/Makefile b/usr.bin/make/unit-tests/Makefile
index b79280b4568..df116e2bd1a 100644
--- a/usr.bin/make/unit-tests/Makefile
+++ b/usr.bin/make/unit-tests/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2003/07/29 06:35:09 sjg Exp $
+# $Id: Makefile,v 1.3 2003/07/29 08:16:01 sjg Exp $
#
# Unit tests for make(1)
# The main targets are:
@@ -22,22 +22,22 @@ LIST+= four five six
FU_mod-ts = a / b / cool
mod-ts:
- @echo LIST='${LIST}'
- @echo LIST:ts,='${LIST:ts,}'
- @echo LIST:ts/:tu='${LIST:ts/:tu}'
- @echo LIST:tu:ts/='${LIST:tu:ts/}'
- @echo LIST:ts:='${LIST:ts:}'
- @echo LIST:ts='${LIST:ts}'
- @echo LIST:ts:S/two/2/='${LIST:ts:S/two/2/}'
- @echo LIST:S/two/2/:ts='${LIST:S/two/2/:ts}'
- @echo LIST:ts/:S/two/2/='${LIST:ts/:S/two/2/}'
- @echo "LIST:ts\n='${LIST:ts\n}'"
- @echo "LIST:ts\t='${LIST:ts\t}'"
- @echo "LIST:ts\012:tu='${LIST:ts\012:tu}'"
- @echo "LIST:tx='${LIST:tx}'"
- @echo "LIST:ts\a:tu='${LIST:ts\a:tu}'"
- @echo "FU_$@='${FU_${@:ts}:ts}'"
- @echo "FU_$@:ts:T='${FU_${@:ts}:ts:T}' == cool?"
+ @echo 'LIST="${LIST}"'
+ @echo 'LIST:ts,="${LIST:ts,}"'
+ @echo 'LIST:ts/:tu="${LIST:ts/:tu}"'
+ @echo 'LIST:tu:ts/="${LIST:tu:ts/}"'
+ @echo 'LIST:ts:="${LIST:ts:}"'
+ @echo 'LIST:ts="${LIST:ts}"'
+ @echo 'LIST:ts:S/two/2/="${LIST:ts:S/two/2/}"'
+ @echo 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"'
+ @echo 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"'
+ @echo 'LIST:ts\n="${LIST:ts\n}"'
+ @echo 'LIST:ts\t="${LIST:ts\t}"'
+ @echo 'LIST:ts\012:tu="${LIST:ts\012:tu}"'
+ @echo 'LIST:tx="${LIST:tx}"'
+ @echo 'LIST:ts\a:tu="${LIST:ts\a:tu}"'
+ @echo 'FU_$@="${FU_${@:ts}:ts}"'
+ @echo 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?'
clean:
rm -f *.out *.fail *.core
diff --git a/usr.bin/make/unit-tests/test.exp b/usr.bin/make/unit-tests/test.exp
index 2294429307f..8f5b3e46682 100644
--- a/usr.bin/make/unit-tests/test.exp
+++ b/usr.bin/make/unit-tests/test.exp
@@ -1,30 +1,30 @@
-LIST=one two three four five six
-LIST:ts,=one,two,three,four,five,six
-LIST:ts/:tu=ONE/TWO/THREE/FOUR/FIVE/SIX
-LIST:tu:ts/=ONE/TWO/THREE/FOUR/FIVE/SIX
-LIST:ts:=one:two:three:four:five:six
-LIST:ts=onetwothreefourfivesix
-LIST:ts:S/two/2/=one2threefourfivesix
-LIST:S/two/2/:ts=one2threefourfivesix
-LIST:ts/:S/two/2/=one/2/three/four/five/six
-LIST:ts\n='one
+LIST="one two three four five six"
+LIST:ts,="one,two,three,four,five,six"
+LIST:ts/:tu="ONE/TWO/THREE/FOUR/FIVE/SIX"
+LIST:tu:ts/="ONE/TWO/THREE/FOUR/FIVE/SIX"
+LIST:ts:="one:two:three:four:five:six"
+LIST:ts="onetwothreefourfivesix"
+LIST:ts:S/two/2/="one2threefourfivesix"
+LIST:S/two/2/:ts="one2threefourfivesix"
+LIST:ts/:S/two/2/="one/2/three/four/five/six"
+LIST:ts\n="one
two
three
four
five
-six'
-LIST:ts\t='one two three four five six'
-LIST:ts\012:tu='ONE
+six"
+LIST:ts\t="one two three four five six"
+LIST:ts\012:tu="ONE
TWO
THREE
FOUR
FIVE
-SIX'
+SIX"
make: Bad modifier `:tx' for LIST
make: Unclosed substitution for LIST (/ missing)
-LIST:tx='}'
+LIST:tx="}"
make: Bad modifier `:ts\a' for LIST
make: Unclosed substitution for LIST (/ missing)
-LIST:ts\a:tu='\a:tu}'
-FU_mod-ts='a/b/cool'
-FU_mod-ts:ts:T='cool' == cool?
+LIST:ts\a:tu="\a:tu}"
+FU_mod-ts="a/b/cool"
+FU_mod-ts:ts:T="cool" == cool?