From: Ralf Wildenhues Date: Thu, 3 Feb 2005 10:03:51 +0000 (+0000) Subject: * tests/quote.test: Backport fix for spurious failures on Cygwin. X-Git-Tag: release-1-5-12~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e77d1248b180059f7fabc8061d70840f19be6f0;p=thirdparty%2Flibtool.git * tests/quote.test: Backport fix for spurious failures on Cygwin. --- diff --git a/ChangeLog b/ChangeLog index 517723b97..d5c563c75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-02-03 Ralf Wildenhues + * tests/quote.test: Backport fix for spurious failures on Cygwin. + * THANKS: Update. 2005-02-03 Peter O'Gorman diff --git a/tests/quote.test b/tests/quote.test index 69b8b5e8c..f7b747a50 100755 --- a/tests/quote.test +++ b/tests/quote.test @@ -95,7 +95,10 @@ for mode in compile link install; do # 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 ${match_preflag}${flag}test " + # We must nost attempt to match $preargs in the output, because libtool + # may modify them. For example, on Cygwin, ``libtool --mode=link gcc -o + # foo foo.o'' becomes ``gcc -o foo.exe foo.o''. + match="${match_preflag}${flag}test " case "$result" in *"$match"*) $echo "= passed: $result" @@ -110,7 +113,7 @@ 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 ${match_preflag}${flag}\\${mchar}test\\${mchar} " + match="${match_preflag}${flag}\\${mchar}test\\${mchar} " case "$result" in *"$match"*) $echo "= passed: $result" @@ -128,7 +131,7 @@ 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 ${match_preflag}\"${flag}${mchar}test${mchar}\" " + match="${match_preflag}\"${flag}${mchar}test${mchar}\" " case "$result" in *"$match"*) $echo "= passed: $result"