automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests: work around dash quoting issue in case statements.


From: Ralf Wildenhues
Subject: tests: work around dash quoting issue in case statements.
Date: Sun, 14 Nov 2010 18:24:41 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Apparently, dash 0.5.5.1 has some problems with avoiding expansion in
case patterns when unusual characters are involved.  I'm committing the
following patch to maint to let these tests PASS instead of SKIP with
this shell.

Thanks,
Ralf

    tests: work around dash quoting issue in case statements.
    
    * tests/color.test, tests/color2.test: Quote variable in case
    pattern, to avoid skipping tests with dash 0.5.5.1.

diff --git a/tests/color.test b/tests/color.test
index 9d86785..c1032fd 100755
--- a/tests/color.test
+++ b/tests/color.test
@@ -34,7 +34,7 @@ std=''
 # BSD 'grep' works from a pipe, but not a seekable file.
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
-  $std) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 
diff --git a/tests/color2.test b/tests/color2.test
index eedd37d..306aa04 100755
--- a/tests/color2.test
+++ b/tests/color2.test
@@ -34,7 +34,7 @@ std=''
 # BSD 'grep' works from a pipe, but not a seekable file.
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
-  $std) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]