]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: question mark is extended regex for non-GNU grep.
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Fri, 21 Nov 2014 18:56:27 +0000 (18:56 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 21 Nov 2014 18:57:40 +0000 (18:57 +0000)
Accepting \? for at-most-once in basic regex is a GNU grep
extension, not accepted by AIX grep for example.
* tests/libtool.at: Use \{0,1\} instead of ? with GREP.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
tests/libtool.at

index a46679049e50329264a642559dbc9d22482ccf44..7431820a5d0b9cbe11224a531662fcb240348b84 100755 (executable)
@@ -116,14 +116,14 @@ for mode in compile link install; do
           [0], [stdout])
   # NOTE: we use "..."'"'"..." to insert a literal quote into the expression
   #       because "...\"..." is not expanded consistently by all shells.
-  AT_CHECK([$GREP "$mode:.*$match_preflag"'"\?'"$flag\\\\\\\\:test\\\\\\\\"'"\? ' stdout],
+  AT_CHECK([$GREP "$mode:.*$match_preflag"'"\{0,1\}'"$flag\\\\\\\\:test\\\\\\\\"'"\{0,1\} ' stdout],
              [0], [ignore])
 
   # Shell metacharacters that should be backslashified by libtool.
   for mchar in \" \` \$; do
     AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag"$flag$mchar:test$mchar" $postargs],
             [0], [stdout])
-    AT_CHECK([$GREP "$mode:.*$match_preflag"'"'"\?$flag\\\\$mchar:test\\\\$mchar"'"'"\? " stdout], [0], [ignore])
+    AT_CHECK([$GREP "$mode:.*$match_preflag"'"'"\{0,1\}$flag\\\\$mchar:test\\\\$mchar"'"'"\{0,1\} " stdout], [0], [ignore])
   done
 
   # Shell metacharacters that should be double quoted by libtool, and need