mirror of
https://https.git.savannah.gnu.org/git/grep.git
synced 2026-01-26 15:39:06 +00:00
This adds a rule run at "make check" time to ensure that
test scripts are consistently executable.
This change is not required for "make check", but makes it easier
for people to run scripts manually, but that is discouraged because
doing so makes it easy to omit important variable settings that
are normally provided via TESTS_ENVIRONMENT.
This change also makes each of the existing TESTS executable.
* tests/Makefile.am (check_executable_TESTS): New rule.
(check): Depend on it.
* tests/{all_scripts}: chmod 755.
Prompted by a report from Eric Blake.
21 lines
629 B
Bash
Executable File
21 lines
629 B
Bash
Executable File
#!/bin/sh
|
|
# Case-insensitive grep with a 0-size input file would fail in grep up to 2.6.3
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
|
|
require_en_utf8_locale_
|
|
|
|
LC_ALL=en_US.UTF-8
|
|
export LC_ALL
|
|
|
|
echo x | grep -f /dev/null; test $? = 1 || fail=1
|
|
echo x | grep -if /dev/null; test $? = 1 || fail=1
|
|
echo x | grep -Ff /dev/null; test $? = 1 || fail=1
|
|
echo x | grep -Fif /dev/null; test $? = 1 || fail=1
|
|
|
|
grep -f /dev/null < /dev/null; test $? = 1 || fail=1
|
|
grep -if /dev/null < /dev/null; test $? = 1 || fail=1
|
|
grep -Ff /dev/null < /dev/null; test $? = 1 || fail=1
|
|
grep -Fif /dev/null < /dev/null; test $? = 1 || fail=1
|
|
|
|
Exit $fail
|