Blame tests/two-chars

Packit 709fb3
#! /bin/sh
Packit 709fb3
# Check for grep -F with two patterns consisting of the same char.
Packit 709fb3
#
Packit 709fb3
# Copyright 2016-2017 Free Software Foundation, Inc.
Packit 709fb3
#
Packit 709fb3
# Copying and distribution of this file, with or without modification,
Packit 709fb3
# are permitted in any medium without royalty provided the copyright
Packit 709fb3
# notice and this notice are preserved.
Packit 709fb3
Packit 709fb3
. "${srcdir=.}/init.sh"; path_prepend_ ../src
Packit 709fb3
Packit 709fb3
require_en_utf8_locale_
Packit 709fb3
Packit 709fb3
fail=0
Packit 709fb3
Packit 709fb3
for LOC in en_US.UTF-8 $zh $LOCALE_FR_UTF8; do
Packit 709fb3
  printf '0\n0\n' >pat
Packit 709fb3
  printf '0\n' >in
Packit 709fb3
  out=out-$LOC
Packit 709fb3
  LC_ALL=$LOC grep -Ff pat in >$out || fail=1
Packit 709fb3
  compare in $out || fail=1
Packit 709fb3
done
Packit 709fb3
Packit 709fb3
Exit $fail