2000-09-03 Alexandre Oliva <aoliva@redhat.com>
+ * tests/quote.test: Move the match test out of case statements, to
+ work around bug in /bin/sh of several OSs.
+
* tests/defs (CC): Extract from the libtool script.
* tests/link.test, tests/link-2.test, tests/quote.test: Use it.
# Trivial.
$echo "= trying: no quoting"
result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}test" $postargs` || status=1
+ # We used to have the contents of $match in the case statement,
+ # without an intermediate variable, but it would fail on at least
+ # Solaris' and HP-UX's /bin/sh. Ugh!
+ match="$preargs ${preflag}${flag}test "
case "$result" in
- *"$preargs ${preflag}${flag}test "*)
+ *"$match"*)
$echo "= passed: $result"
;;
*)
for mchar in \\ \" \` \$; do
$echo "= trying: \\$mchar quoting"
result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=1
+ match="$preargs ${preflag}${flag}\\${mchar}test\\${mchar} "
case "$result" in
- *"$preargs ${preflag}${flag}\\${mchar}test\\${mchar} "*)
+ *"$match"*)
$echo "= passed: $result"
;;
*)
$echo "= trying: \"$mchar\" quoting"
result=`$libtool -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=1
+ match="$preargs ${preflag}\"${flag}${mchar}test${mchar}\" "
case "$result" in
- *"$preargs ${preflag}\"${flag}${mchar}test${mchar}\" "*)
+ *"$match"*)
$echo "= passed: $result"
;;
*)