projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from ../bash-2.05.tar.gz.
[platform/upstream/bash.git]
/
tests
/
posix2.tests
diff --git
a/tests/posix2.tests
b/tests/posix2.tests
index
e6d2479
..
2161379
100644
(file)
--- a/
tests/posix2.tests
+++ b/
tests/posix2.tests
@@
-140,18
+140,20
@@
if [ "$OPTIND" != 3 ] || [ "$store" != a ] || [ "$OPTARG" != aoptval ]; then
testfail "getopts"
fi
testfail "getopts"
fi
+# if I change the default quoting style for variable values, these
+# next four must change
+
newtest
SQUOTE="'"
val1=$(set | sed -n 's:^SQUOTE=::p')
newtest
SQUOTE="'"
val1=$(set | sed -n 's:^SQUOTE=::p')
-# if I change the default quoting style for variable values, this must change
-if [ "$val1" != "''\'''" ]; then
+if [ "$val1" != "\$'\\''" ]; then
testfail "variable quoting 1"
fi
newtest
VTILDE='~'
val1=$(set | sed -n 's:^VTILDE=::p')
testfail "variable quoting 1"
fi
newtest
VTILDE='~'
val1=$(set | sed -n 's:^VTILDE=::p')
-if [ "$val1" != "'~'" ]; then
+if [ "$val1" != "
\$
'~'" ]; then
testfail "variable quoting 2"
fi
testfail "variable quoting 2"
fi
@@
-165,7
+167,7
@@
fi
newtest
VHASH2=#abcd
val1=$(set | sed -n 's:^VHASH2=::p')
newtest
VHASH2=#abcd
val1=$(set | sed -n 's:^VHASH2=::p')
-if [ "$val1" != "'#abcd'" ]; then
+if [ "$val1" != "
\$
'#abcd'" ]; then
testfail "variable quoting 4"
fi
testfail "variable quoting 4"
fi