]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/quote.test: Move the match test out of case statements, to
authorAlexandre Oliva <aoliva@redhat.com>
Sun, 3 Sep 2000 21:37:22 +0000 (21:37 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 3 Sep 2000 21:37:22 +0000 (21:37 +0000)
work around bug in /bin/sh of several OSs.

ChangeLog
tests/quote.test

index cb5a6c2cde5dda6abb984d20d99bbc636b4c86ea..0db4cfa7232b7c54aa9c563d5ea7d7a57432cef2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 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.
 
index 47a07e4f0cea93317f5e2e0301a168d13308a715..6866281ff4f8046bdb42f87727478a62922bc539 100755 (executable)
@@ -86,8 +86,12 @@ for mode in compile link install; do
   # 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"
     ;;
   *)
@@ -100,8 +104,9 @@ for mode in compile link install; do
   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"
       ;;
     *)
@@ -117,8 +122,9 @@ for mode in compile link install; 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"
       ;;
     *)