Blame tests/dfaexec-multibyte

Packit 709fb3
#!/bin/sh
Packit 709fb3
# This would fail for grep-2.5.3
Packit 709fb3
. "${srcdir=.}/init.sh"; path_prepend_ ../src
Packit 709fb3
Packit 709fb3
printf 'aa\nab\nba\nbb\n' > exp1 || framework_failure_
Packit 709fb3
printf '1 2 3\n' > exp2 || framework_failure_
Packit 709fb3
Packit 709fb3
fail=0
Packit 709fb3
Packit 709fb3
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
Packit 709fb3
  out=out1-ab-$LOC
Packit 709fb3
  LC_ALL=$LOC grep -E '([a]|[b]){2}' < exp1 > $out || fail=1
Packit 709fb3
  compare exp1 $out || fail=1
Packit 709fb3
Packit 709fb3
  out=out1-ba-$LOC
Packit 709fb3
  LC_ALL=$LOC grep -E '([b]|[a]){2}' < exp1 > $out || fail=1
Packit 709fb3
  compare exp1 $out || fail=1
Packit 709fb3
Packit 709fb3
  out=out2-$LOC
Packit 709fb3
  LC_ALL=$LOC grep -E '^([[:digit:]]+[[:space:]]+){2}' < exp2 > $out || fail=1
Packit 709fb3
  compare exp2 $out || fail=1
Packit 709fb3
Packit 709fb3
done
Packit 709fb3
Packit 709fb3
Exit $fail