]> Savannah Git Hosting - gnulib.git/commitdiff
test-framework-sh: tighten an internal grep regexp
authorJim Meyering <meyering@fb.com>
Thu, 26 Dec 2019 23:59:11 +0000 (15:59 -0800)
committerJim Meyering <meyering@fb.com>
Thu, 26 Dec 2019 23:59:11 +0000 (15:59 -0800)
* tests/init.sh (gl_shell_test_script_): Tighten the grep regexp
that helps test for a working printf.

ChangeLog
tests/init.sh

index 5161363599272a32f1e7eb3e008c2359cd0db6b9..1a0f53223674ddcc5b3e22ac160998289cfd2681 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-26  Jim Meyering  <meyering@fb.com>
+
+       test-framework-sh: tighten an internal grep regexp
+       * tests/init.sh (gl_shell_test_script_): Tighten the grep regexp
+       that helps test for a working printf.
+
 2019-12-26  Bruno Haible  <bruno@clisp.org>
 
        test-framework-sh: Avoid /bin/sh on AIX 7.2 due to its printf built-in.
index 049e0d359c5ffbd13606af5e831f73827e693945..d2c4a7900157512fda63b062e4c7097c855369c5 100644 (file)
@@ -161,10 +161,10 @@ fi
 gl_shell_test_script_='
 test $(echo y) = y || exit 1
 LC_ALL=en_US.UTF-8 printf "\\351" 2>/dev/null \
-  | LC_ALL=C tr "\\351" x | LC_ALL=C grep x > /dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
   || exit 1
 printf "\\351" 2>/dev/null \
-  | LC_ALL=C tr "\\351" x | LC_ALL=C grep x > /dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
   || exit 1
 f_local_() { local v=1; }; f_local_ || exit 1
 f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_