From 51edf4591034f8b3ca6724aa7d8d9b7fb20a5d36 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sun, 3 Sep 2000 21:37:32 +0000 Subject: [PATCH] * tests/quote.test: Move the match test out of case statements, to work around bug in /bin/sh of several OSs. --- ChangeLog | 3 +++ tests/quote.test | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08b5ee254..93a5bb4be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-09-03 Alexandre Oliva + * 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. diff --git a/tests/quote.test b/tests/quote.test index f71ecda03..e301ac3b9 100755 --- a/tests/quote.test +++ b/tests/quote.test @@ -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" ;; *) -- 2.47.3