]> 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:32 +0000 (21:37 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 3 Sep 2000 21:37:32 +0000 (21:37 +0000)
work around bug in /bin/sh of several OSs.

ChangeLog
tests/quote.test

index 08b5ee2543c48cd4df8180fbe959dc538f7c3405..93a5bb4bef612cd4fdb985116a98d471229b8a67 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.
+
        * ltmain.in (variables_saved_for_relink): Attempt to unset them
        instead of setting them to an empty string.
 
index f71ecda03c9756a2d35c0e1e8413e9968f6f8431..e301ac3b97c02f31281b690990c97d72268b63b5 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"
       ;;
     *)