From 87a84a103685be58b1cc218410156df7eff15662 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 4 May 2014 18:46:40 -0700 Subject: [PATCH 1/3] tests: improve coverage for prefix-of-multibyte * tests/prefix-of-multibyte: Also test the regex version. --- tests/prefix-of-multibyte | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/prefix-of-multibyte b/tests/prefix-of-multibyte index 70a924e..2ab9a99 100755 --- a/tests/prefix-of-multibyte +++ b/tests/prefix-of-multibyte @@ -13,11 +13,16 @@ encode aABC >exp2 fail=0 for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do - for opt in '' '-F'; do - out=out-$opt-$LOC - LC_ALL=$LOC grep $opt "$(encode A)" exp1 >$out || fail=1 + for type in dfa fgrep regex; do + case $type in + dfa) opt= prefix= ;; + fgrep) opt=-F prefix= ;; + regex) opt= prefix='\(\)\1' ;; + esac + out=out-$type-$LOC + LC_ALL=$LOC grep $opt "$prefix$(encode A)" exp1 >$out || fail=1 compare exp1 $out || fail=1 - LC_ALL=$LOC grep $opt "$(encode aA)" exp2 >$out || fail=1 + LC_ALL=$LOC grep $opt "$prefix$(encode aA)" exp2 >$out || fail=1 compare exp2 $out || fail=1 done done -- 1.9.0