summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2016-12-15 18:22:10 (GMT)
committerAssaf Gordon <assafgordon@gmail.com>2016-12-15 18:22:10 (GMT)
commit2835468094149216148a3c4cd4f96e560622636b (patch)
treeac482d3242ada21d06b7ddd8e20bedc03f2f13e0
parent6e555d5876c9540b294ddf3ca02b3cb1559b5dee (diff)
downloadgrep-non-recursive.zip
grep-non-recursive.tar.gz
grep-non-recursive.tar.bz2
build: update testsnon-recursive
-rwxr-xr-xtests/backref2
-rwxr-xr-xtests/backref-alt2
-rwxr-xr-xtests/backref-multibyte-slow2
-rwxr-xr-xtests/backref-word2
-rwxr-xr-xtests/backslash-s-and-repetition-operators2
-rwxr-xr-xtests/backslash-s-vs-invalid-multitype2
-rwxr-xr-xtests/big-hole3
-rwxr-xr-xtests/big-match2
-rwxr-xr-xtests/bogus-wctob2
-rwxr-xr-xtests/bre2
-rwxr-xr-xtests/c-locale2
-rwxr-xr-xtests/case-fold-backref2
-rwxr-xr-xtests/case-fold-backslash-w2
-rwxr-xr-xtests/case-fold-char-class2
-rwxr-xr-xtests/case-fold-char-range2
-rwxr-xr-xtests/case-fold-char-type2
-rwxr-xr-xtests/case-fold-titlecase5
-rwxr-xr-xtests/char-class-multibyte2
-rwxr-xr-xtests/char-class-multibyte22
-rwxr-xr-xtests/context-02
-rwxr-xr-xtests/count-newline2
-rwxr-xr-xtests/dfa-coverage2
-rwxr-xr-xtests/dfa-heap-overrun2
-rwxr-xr-xtests/dfa-infloop2
-rwxr-xr-xtests/dfaexec-multibyte2
-rwxr-xr-xtests/empty2
-rwxr-xr-xtests/empty-line2
-rwxr-xr-xtests/empty-line-mb2
-rwxr-xr-xtests/encoding-error2
-rwxr-xr-xtests/epipe2
-rwxr-xr-xtests/equiv-classes2
-rwxr-xr-xtests/ere2
-rwxr-xr-xtests/euc-mb6
-rwxr-xr-xtests/false-match-mb-non-utf86
-rwxr-xr-xtests/fedora2
-rwxr-xr-xtests/fgrep-infloop2
-rwxr-xr-xtests/file2
-rwxr-xr-xtests/fmbtest2
-rwxr-xr-xtests/foad12
-rwxr-xr-xtests/grep-dev-null2
-rwxr-xr-xtests/grep-dev-null-out2
-rwxr-xr-xtests/grep-dir2
-rwxr-xr-xtests/help-version2
-rwxr-xr-xtests/high-bit-range2
-rwxr-xr-xtests/in-eq-out-infloop2
-rwxr-xr-xtests/include-exclude2
-rwxr-xr-xtests/inconsistent-range2
-rw-r--r--tests/init.cfg10
-rw-r--r--tests/init.sh10
-rwxr-xr-xtests/initial-tab2
-rwxr-xr-xtests/invalid-multibyte-infloop2
-rwxr-xr-xtests/khadafy2
-rwxr-xr-xtests/kwset-abuse2
-rw-r--r--tests/local.mk2
-rwxr-xr-xtests/long-line-vs-2GiB-read2
-rwxr-xr-xtests/long-pattern-perf2
-rwxr-xr-xtests/match-lines2
-rwxr-xr-xtests/max-count-overread2
-rwxr-xr-xtests/max-count-vs-context2
-rwxr-xr-xtests/mb-dot-newline2
-rwxr-xr-xtests/mb-non-UTF8-overrun2
-rwxr-xr-xtests/mb-non-UTF8-performance2
-rwxr-xr-xtests/multibyte-white-space2
-rwxr-xr-xtests/multiple-begin-or-end-line2
-rwxr-xr-xtests/null-byte6
-rwxr-xr-xtests/options2
-rwxr-xr-xtests/pcre2
-rwxr-xr-xtests/pcre-abort2
-rwxr-xr-xtests/pcre-context2
-rwxr-xr-xtests/pcre-count2
-rwxr-xr-xtests/pcre-infloop2
-rwxr-xr-xtests/pcre-invalid-utf8-infloop2
-rwxr-xr-xtests/pcre-invalid-utf8-input2
-rwxr-xr-xtests/pcre-jitstack2
-rwxr-xr-xtests/pcre-o2
-rwxr-xr-xtests/pcre-utf82
-rwxr-xr-xtests/pcre-w2
-rwxr-xr-xtests/pcre-wx-backref2
-rwxr-xr-xtests/pcre-z2
-rwxr-xr-xtests/posix-bracket2
-rwxr-xr-xtests/prefix-of-multibyte2
-rwxr-xr-xtests/proc2
-rwxr-xr-xtests/r-dot2
-rwxr-xr-xtests/repetition-overflow2
-rwxr-xr-xtests/reversed-range-endpoints2
-rwxr-xr-xtests/sjis-mb6
-rwxr-xr-xtests/skip-device2
-rwxr-xr-xtests/skip-read2
-rwxr-xr-xtests/spencer12
-rwxr-xr-xtests/spencer1-locale9
-rw-r--r--tests/spencer22
-rwxr-xr-xtests/status2
-rwxr-xr-xtests/surrogate-pair2
-rwxr-xr-xtests/symlink2
-rwxr-xr-xtests/triple-backref2
-rwxr-xr-xtests/turkish-I2
-rwxr-xr-xtests/turkish-I-without-dot2
-rwxr-xr-xtests/turkish-eyes2
-rwxr-xr-xtests/two-chars2
-rwxr-xr-xtests/two-files2
-rwxr-xr-xtests/unibyte-binary2
-rwxr-xr-xtests/unibyte-bracket-expr2
-rwxr-xr-xtests/unibyte-negated-circumflex2
-rwxr-xr-xtests/utf8-bracket2
-rwxr-xr-xtests/warn-char-classes2
-rwxr-xr-xtests/word-delim-multibyte2
-rwxr-xr-xtests/word-multi-file2
-rwxr-xr-xtests/word-multibyte5
-rwxr-xr-xtests/write-error-msg2
-rwxr-xr-xtests/yesno2
-rwxr-xr-xtests/z-anchor-newline2
111 files changed, 138 insertions, 130 deletions
diff --git a/tests/backref b/tests/backref
index 1d15434..fb03d93 100755
--- a/tests/backref
+++ b/tests/backref
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
failures=0
diff --git a/tests/backref-alt b/tests/backref-alt
index 654b345..d07bb07 100755
--- a/tests/backref-alt
+++ b/tests/backref-alt
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
echo aa > in || framework_failure_
diff --git a/tests/backref-multibyte-slow b/tests/backref-multibyte-slow
index 9c4fe06..15a80ca 100755
--- a/tests/backref-multibyte-slow
+++ b/tests/backref-multibyte-slow
@@ -1,6 +1,6 @@
#!/bin/sh
# This was approximately quadratic up to grep-2.6.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_timeout_
diff --git a/tests/backref-word b/tests/backref-word
index e5b5486..ff67e0c 100755
--- a/tests/backref-word
+++ b/tests/backref-word
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.6
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'foo foo bar\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/backslash-s-and-repetition-operators b/tests/backslash-s-and-repetition-operators
index 45a4b55..8cb0281 100755
--- a/tests/backslash-s-and-repetition-operators
+++ b/tests/backslash-s-and-repetition-operators
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/backslash-s-vs-invalid-multitype b/tests/backslash-s-vs-invalid-multitype
index a77b6a5..f0c38f6 100755
--- a/tests/backslash-s-vs-invalid-multitype
+++ b/tests/backslash-s-vs-invalid-multitype
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/big-hole b/tests/big-hole
index eac077f..1531901 100755
--- a/tests/big-hole
+++ b/tests/big-hole
@@ -1,7 +1,8 @@
#!/bin/sh
# Check that grep --binary-file=without-match quickly skips files with holes.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+
expensive_
diff --git a/tests/big-match b/tests/big-match
index 0da9731..e765276 100755
--- a/tests/big-match
+++ b/tests/big-match
@@ -1,7 +1,7 @@
#!/bin/sh
# Check that grep doesn't mishandle long matching lines.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
expensive_
# Create a one-line file containing slightly more than 2 GiB.
diff --git a/tests/bogus-wctob b/tests/bogus-wctob
index 6be6c39..d4bf3d0 100755
--- a/tests/bogus-wctob
+++ b/tests/bogus-wctob
@@ -2,7 +2,7 @@
# This was latent in grep-2.8 and earlier because we punted interpretation
# of MBCSETs to glibc. However, it becomes apparent as soon as "[à]" is
# simplified to "à".
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf '\340' > in || framework_failure_
fail=0
diff --git a/tests/bre b/tests/bre
index 324d198..c0ff96f 100755
--- a/tests/bre
+++ b/tests/bre
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/c-locale b/tests/c-locale
index 1fe5c70..d32eb5c 100755
--- a/tests/c-locale
+++ b/tests/c-locale
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/case-fold-backref b/tests/case-fold-backref
index b96b481..5e42621 100755
--- a/tests/case-fold-backref
+++ b/tests/case-fold-backref
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.5.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf '%s foo\n' foo fOo Foo FOO > exp1 || framework_failure_
fail=0
diff --git a/tests/case-fold-backslash-w b/tests/case-fold-backslash-w
index 57ff0f5..dbed133 100755
--- a/tests/case-fold-backslash-w
+++ b/tests/case-fold-backslash-w
@@ -1,7 +1,7 @@
#!/bin/sh
# test that \W works on case-insensitive matches. It used to become \w.
# Derived from https://savannah.gnu.org/bugs/?28162
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
if echo foo bar | LANG=C.ASCII grep '^foo\W'; then
echo foo bar | LANG=C.ASCII grep -i '^foo\W' || fail_ ASCII insensitive
diff --git a/tests/case-fold-char-class b/tests/case-fold-char-class
index ac8f3ee..7202f45 100755
--- a/tests/case-fold-char-class
+++ b/tests/case-fold-char-class
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.5.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'Y\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/case-fold-char-range b/tests/case-fold-char-range
index 4203024..0fb9f10 100755
--- a/tests/case-fold-char-range
+++ b/tests/case-fold-char-range
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.5.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'A\nZ\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/case-fold-char-type b/tests/case-fold-char-type
index d5fd67c..6d6da52 100755
--- a/tests/case-fold-char-type
+++ b/tests/case-fold-char-type
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.5.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'Y\n' > exp1 || framework_failure_
fail=0
diff --git a/tests/case-fold-titlecase b/tests/case-fold-titlecase
index 57a4613..78e65a0 100755
--- a/tests/case-fold-titlecase
+++ b/tests/case-fold-titlecase
@@ -16,7 +16,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte
index b957518..366249c 100755
--- a/tests/char-class-multibyte
+++ b/tests/char-class-multibyte
@@ -1,6 +1,6 @@
#!/bin/sh
# This would segfault for grep-2.6
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/char-class-multibyte2 b/tests/char-class-multibyte2
index 6cdada5..bbc4487 100755
--- a/tests/char-class-multibyte2
+++ b/tests/char-class-multibyte2
@@ -1,6 +1,6 @@
#!/bin/sh
# This test would segfault for grep-2.14
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/context-0 b/tests/context-0
index 4b63305..5c222ce 100755
--- a/tests/context-0
+++ b/tests/context-0
@@ -1,6 +1,6 @@
#!/bin/sh
# 0 lines of context
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
cat <<EOF > in || framework_failure_
needle
diff --git a/tests/count-newline b/tests/count-newline
index b37b8ec..c395904 100755
--- a/tests/count-newline
+++ b/tests/count-newline
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf '%1024d\nb\n' 0 >in || framework_failure_
diff --git a/tests/dfa-coverage b/tests/dfa-coverage
index ca8654f..b47e457 100755
--- a/tests/dfa-coverage
+++ b/tests/dfa-coverage
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/dfa-heap-overrun b/tests/dfa-heap-overrun
index c8bb185..b62baa1 100755
--- a/tests/dfa-heap-overrun
+++ b/tests/dfa-heap-overrun
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/dfa-infloop b/tests/dfa-infloop
index e35eef5..39d93fd 100755
--- a/tests/dfa-infloop
+++ b/tests/dfa-infloop
@@ -1,6 +1,6 @@
#!/bin/sh
# This would infloop for some unreleased versions between 2.26 and 2.27
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
diff --git a/tests/dfaexec-multibyte b/tests/dfaexec-multibyte
index baac9ba..8c05db2 100755
--- a/tests/dfaexec-multibyte
+++ b/tests/dfaexec-multibyte
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.5.3
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'aa\nab\nba\nbb\n' > exp1 || framework_failure_
printf '1 2 3\n' > exp2 || framework_failure_
diff --git a/tests/empty b/tests/empty
index 2b5ecf2..f5b2dff 100755
--- a/tests/empty
+++ b/tests/empty
@@ -8,7 +8,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
diff --git a/tests/empty-line b/tests/empty-line
index 25e9509..6696926 100755
--- a/tests/empty-line
+++ b/tests/empty-line
@@ -2,7 +2,7 @@
# Test that the empty pattern matches everything.
# Some of these tests failed in grep 2.18.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
printf 'abc\n' >in || framework_failure_
diff --git a/tests/empty-line-mb b/tests/empty-line-mb
index 605ecf9..e8492e8 100755
--- a/tests/empty-line-mb
+++ b/tests/empty-line-mb
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/encoding-error b/tests/encoding-error
index 5f5a09d..5dd1cf8 100755
--- a/tests/encoding-error
+++ b/tests/encoding-error
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/epipe b/tests/epipe
index 3b568e3..7f83ff6 100755
--- a/tests/epipe
+++ b/tests/epipe
@@ -2,7 +2,7 @@
# Check that a write failure with errno == EPIPE
# doesn't cause grep to issue multiple "write error" diagnostics.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
if
# Use awk to output a bounded amount of data to the grep in question,
diff --git a/tests/equiv-classes b/tests/equiv-classes
index 940efa4..52de797 100755
--- a/tests/equiv-classes
+++ b/tests/equiv-classes
@@ -1,7 +1,7 @@
#!/bin/sh
# Test that equivalence classes work.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/ere b/tests/ere
index 68d1533..1bd3243 100755
--- a/tests/ere
+++ b/tests/ere
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/euc-mb b/tests/euc-mb
index c639374..863b145 100755
--- a/tests/euc-mb
+++ b/tests/euc-mb
@@ -2,10 +2,10 @@
# test that matches starting in the middle of a multibyte char aren't rejected
# too greedily.
# Derived from https://savannah.gnu.org/bugs/?23814
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-# Add "." to PATH for the use of get-mb-cur-max.
-path_prepend_ .
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
require_compiled_in_MB_support
diff --git a/tests/false-match-mb-non-utf8 b/tests/false-match-mb-non-utf8
index c772793..a43e6d7 100755
--- a/tests/false-match-mb-non-utf8
+++ b/tests/false-match-mb-non-utf8
@@ -7,10 +7,10 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-# Add "." to PATH for the use of get-mb-cur-max.
-path_prepend_ .
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
fail=0
diff --git a/tests/fedora b/tests/fedora
index 43650f3..e1da346 100755
--- a/tests/fedora
+++ b/tests/fedora
@@ -1,6 +1,6 @@
#!/bin/sh
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# GREP Regression test suite for Fedora bugs and fixes
# (c) 2008 Lubomir Rintel
diff --git a/tests/fgrep-infloop b/tests/fgrep-infloop
index 015ec74..ce2d4e9 100755
--- a/tests/fgrep-infloop
+++ b/tests/fgrep-infloop
@@ -1,6 +1,6 @@
#!/bin/sh
# This would infloop for grep-2.6.1
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_timeout_
diff --git a/tests/file b/tests/file
index 11de7e4..ba598b8 100755
--- a/tests/file
+++ b/tests/file
@@ -10,7 +10,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/fmbtest b/tests/fmbtest
index 14fb9d3..d3be306 100755
--- a/tests/fmbtest
+++ b/tests/fmbtest
@@ -5,7 +5,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
cz=cs_CZ.UTF-8
diff --git a/tests/foad1 b/tests/foad1
index 9417381..c4f2bb3 100755
--- a/tests/foad1
+++ b/tests/foad1
@@ -9,7 +9,7 @@
#
# This set of tests was started by Julian Foad.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
failures=0
diff --git a/tests/grep-dev-null b/tests/grep-dev-null
index 49a9385..4e2b820 100755
--- a/tests/grep-dev-null
+++ b/tests/grep-dev-null
@@ -1,6 +1,6 @@
#!/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
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/grep-dev-null-out b/tests/grep-dev-null-out
index 13a4843..a628020 100755
--- a/tests/grep-dev-null-out
+++ b/tests/grep-dev-null-out
@@ -1,7 +1,7 @@
#!/bin/sh
# Outputting to /dev/null.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
diff --git a/tests/grep-dir b/tests/grep-dir
index 4947512..5fba30f 100755
--- a/tests/grep-dir
+++ b/tests/grep-dir
@@ -1,6 +1,6 @@
#!/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
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
mkdir a || framework_failure
diff --git a/tests/help-version b/tests/help-version
index 9d9b147..dcebe63 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# Terminate any background processes
cleanup_() { kill $pid 2>/dev/null && wait $pid; }
diff --git a/tests/high-bit-range b/tests/high-bit-range
index e414c93..7450342 100755
--- a/tests/high-bit-range
+++ b/tests/high-bit-range
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop
index 1742825..7a87167 100755
--- a/tests/in-eq-out-infloop
+++ b/tests/in-eq-out-infloop
@@ -1,6 +1,6 @@
#!/bin/sh
# Demonstrate the disk-filling infloop when redirecting to an input file.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
# Use an input file large enough that the problem is reproducible in spite
diff --git a/tests/include-exclude b/tests/include-exclude
index c3d22a1..ee45876 100755
--- a/tests/include-exclude
+++ b/tests/include-exclude
@@ -1,6 +1,6 @@
#!/bin/sh
# Use of any --include or --exclude* option would segfault in 2.6 and 2.6.1
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
mkdir -p x/dir || framework_failure_
echo aaa > x/a || framework_failure_
diff --git a/tests/inconsistent-range b/tests/inconsistent-range
index e28acde..b56957f 100755
--- a/tests/inconsistent-range
+++ b/tests/inconsistent-range
@@ -1,6 +1,6 @@
#!/bin/sh
# This would fail for grep-2.6
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf '00a\n00g\n00z\n00A\n00G\n00Z\n' > in || framework_failure_
diff --git a/tests/init.cfg b/tests/init.cfg
index 1677ec5..b5e8f59 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -58,7 +58,7 @@ require_pcre_()
# If the locale is not available, just skip the test.
require_en_utf8_locale_()
{
- path_prepend_ .
+ path_prepend_ ./tests
case $(get-mb-cur-max en_US.UTF-8) in
[3456]) ;;
*) skip_ 'en_US.UTF-8 locale not found' ;;
@@ -67,7 +67,7 @@ require_en_utf8_locale_()
require_tr_utf8_locale_()
{
- path_prepend_ .
+ path_prepend_ ./tests
case $(get-mb-cur-max tr_TR.UTF-8) in
[3456]) ;;
*) skip_ 'tr_TR.UTF-8 locale not found' ;;
@@ -76,7 +76,7 @@ require_tr_utf8_locale_()
require_ru_RU_koi8_r()
{
- path_prepend_ .
+ path_prepend_ ./tests
case $(get-mb-cur-max ru_RU.KOI8-R) in
1) ;;
*) skip_ 'ru_RU.KOI8-R locale not found' ;;
@@ -92,7 +92,7 @@ require_compiled_in_MB_support()
require_unibyte_locale()
{
- path_prepend_ .
+ path_prepend_ ./tests
for loc in C en_US; do
for encoding in '' .iso88591 .iso885915 .ISO8859-1 .ISO8859-15; do
locale=$loc$encoding
@@ -124,7 +124,7 @@ require_hi_res_time_()
require_JP_EUC_locale_()
{
local locale=ja_JP.eucJP
- path_prepend_ .
+ path_prepend_ ./tests
case $(get-mb-cur-max $locale) in
[23])
LC_ALL=$locale &&
diff --git a/tests/init.sh b/tests/init.sh
index ee08022..976e046 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -21,14 +21,14 @@
# The typical skeleton of a test looks like this:
#
# #!/bin/sh
-# . "${srcdir=.}/init.sh"; path_prepend_ .
+# . "${srcdir=.}/tests/init.sh"; path_prepend_ .
# Execute some commands.
# Note that these commands are executed in a subdirectory, therefore you
# need to prepend "../" to relative filenames in the build directory.
# Note that the "path_prepend_ ." is useful only if the body of your
# test invokes programs residing in the initial directory.
# For example, if the programs you want to test are in src/, and this test
-# script is named tests/test-1, then you would use "path_prepend_ ../src",
+# script is named tests/test-1, then you would use "path_prepend_ ./src",
# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH"
# to all tests via automake's TESTS_ENVIRONMENT.
# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
@@ -52,7 +52,7 @@
# Makefile:
# $ export srcdir=../../tests # this is an example
# 3. Execute the commands from the test, copy&pasting them one by one:
-# $ . "$srcdir/init.sh"; path_prepend_ .
+# $ . "$srcdir/tests/init.sh"; path_prepend_ .
# ...
# 4. Finally
# $ exit
@@ -604,8 +604,8 @@ mktempd_ ()
# If you want to override the testdir_prefix_ function,
# or to add more utility functions, use this file.
-test -f "$srcdir/init.cfg" \
- && . "$srcdir/init.cfg"
+test -f "$srcdir/tests/init.cfg" \
+ && . "$srcdir/tests/init.cfg"
setup_ "$@"
# This trap is here, rather than in the setup_ function, because some
diff --git a/tests/initial-tab b/tests/initial-tab
index 8b3cb8c..47a4be2 100755
--- a/tests/initial-tab
+++ b/tests/initial-tab
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/invalid-multibyte-infloop b/tests/invalid-multibyte-infloop
index 5b3bdfc..e61a5c2 100755
--- a/tests/invalid-multibyte-infloop
+++ b/tests/invalid-multibyte-infloop
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that we don't trigger a grep -F infloop.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/khadafy b/tests/khadafy
index 73ee1c7..6a30f2d 100755
--- a/tests/khadafy
+++ b/tests/khadafy
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/kwset-abuse b/tests/kwset-abuse
index a8680f8..df43d4e 100755
--- a/tests/kwset-abuse
+++ b/tests/kwset-abuse
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/local.mk b/tests/local.mk
index 0b763e4..18648d1 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -185,7 +185,7 @@ EXTRA_DIST += \
tests/ere.awk \
tests/ere.tests \
tests/init.cfg \
- tests/init.sh \
+ tests/tests/init.sh \
tests/khadafy.lines \
tests/khadafy.regexp \
tests/no-perl \
diff --git a/tests/long-line-vs-2GiB-read b/tests/long-line-vs-2GiB-read
index 29d29ec..162141e 100755
--- a/tests/long-line-vs-2GiB-read
+++ b/tests/long-line-vs-2GiB-read
@@ -4,7 +4,7 @@
# an "Invalid argument" (EINVAL) failure from the read syscall on
# systems like OS/X 10.8.5.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# Searching 2GiB takes a while.
expensive_
diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf
index 0a02e6f..9091682 100755
--- a/tests/long-pattern-perf
+++ b/tests/long-pattern-perf
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/match-lines b/tests/match-lines
index 7e1f291..854c78d 100755
--- a/tests/match-lines
+++ b/tests/match-lines
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'a\n' > in || framework_failure_
diff --git a/tests/max-count-overread b/tests/max-count-overread
index 23c45cb..f8c775c 100755
--- a/tests/max-count-overread
+++ b/tests/max-count-overread
@@ -2,7 +2,7 @@
# Ensure that -m1 stops reading after the first match.
# In grep-2.19, yes x|grep -m1 x would infloop.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
fail=0
diff --git a/tests/max-count-vs-context b/tests/max-count-vs-context
index 5633dd6..4524471 100755
--- a/tests/max-count-vs-context
+++ b/tests/max-count-vs-context
@@ -1,6 +1,6 @@
#!/bin/sh
# Show how -m1 works with -A N when a 2nd match is < N lines after the first
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
cat <<EOF > in || framework_failure_
needle
diff --git a/tests/mb-dot-newline b/tests/mb-dot-newline
index 9e3db15..e2aae1c 100755
--- a/tests/mb-dot-newline
+++ b/tests/mb-dot-newline
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
printf 'a\naa\n' > in || framework_failure_
printf 'aa\n' > exp || framework_failure_
diff --git a/tests/mb-non-UTF8-overrun b/tests/mb-non-UTF8-overrun
index 7743029..19b981f 100755
--- a/tests/mb-non-UTF8-overrun
+++ b/tests/mb-non-UTF8-overrun
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_JP_EUC_locale_
fail=0
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
index 11d0cf7..8b41b10 100755
--- a/tests/mb-non-UTF8-performance
+++ b/tests/mb-non-UTF8-performance
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/multibyte-white-space b/tests/multibyte-white-space
index 7c0d0b7..4c5df1f 100755
--- a/tests/multibyte-white-space
+++ b/tests/multibyte-white-space
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/multiple-begin-or-end-line b/tests/multiple-begin-or-end-line
index ec6da30..26d66e3 100755
--- a/tests/multiple-begin-or-end-line
+++ b/tests/multiple-begin-or-end-line
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
echo aa | grep 'a\(b$\|c$\)' >out && fail=1
compare /dev/null out || fail=1
diff --git a/tests/null-byte b/tests/null-byte
index f9bb00e..65d18ce 100755
--- a/tests/null-byte
+++ b/tests/null-byte
@@ -16,10 +16,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-# Add "." to PATH for the use of get-mb-cur-max.
-path_prepend_ .
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
locales=C
for locale in en_US.iso885915 en_US.UTF-8; do
diff --git a/tests/options b/tests/options
index 97d2a03..d29658d 100755
--- a/tests/options
+++ b/tests/options
@@ -13,7 +13,7 @@
# -f pattern_file ... [file ...]
# grep [ -E| -F][ -c| -l| -q ][-insvx] pattern_list [file...]
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/pcre b/tests/pcre
index a290099..fb50b75 100755
--- a/tests/pcre
+++ b/tests/pcre
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
fail=0
diff --git a/tests/pcre-abort b/tests/pcre-abort
index 83c90e4..fb2485f 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -8,7 +8,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
fail=0
diff --git a/tests/pcre-context b/tests/pcre-context
index b910a20..e36c18a 100755
--- a/tests/pcre-context
+++ b/tests/pcre-context
@@ -1,6 +1,6 @@
#!/bin/sh
# Test Perl regex with context
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
cat >in <<'EOF'
diff --git a/tests/pcre-count b/tests/pcre-count
index e638635..35c105e 100755
--- a/tests/pcre-count
+++ b/tests/pcre-count
@@ -8,7 +8,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
fail=0
diff --git a/tests/pcre-infloop b/tests/pcre-infloop
index fe97353..3124097 100755
--- a/tests/pcre-infloop
+++ b/tests/pcre-infloop
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/pcre-invalid-utf8-infloop b/tests/pcre-invalid-utf8-infloop
index e0503bc..dba6662 100755
--- a/tests/pcre-invalid-utf8-infloop
+++ b/tests/pcre-invalid-utf8-infloop
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/pcre-invalid-utf8-input b/tests/pcre-invalid-utf8-input
index 17c1d4e..8ee4d5a 100755
--- a/tests/pcre-invalid-utf8-input
+++ b/tests/pcre-invalid-utf8-input
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_timeout_
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/pcre-jitstack b/tests/pcre-jitstack
index 5bdb5a8..581f680 100755
--- a/tests/pcre-jitstack
+++ b/tests/pcre-jitstack
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
for p in 'base64 -d' 'base64 -D' 'openssl base64 -d' \
diff --git a/tests/pcre-o b/tests/pcre-o
index 7c46f27..5c9ea0b 100755
--- a/tests/pcre-o
+++ b/tests/pcre-o
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
fail=0
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8
index a29b412..985bf8a 100755
--- a/tests/pcre-utf8
+++ b/tests/pcre-utf8
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
LC_ALL=en_US.UTF-8 require_pcre_
diff --git a/tests/pcre-w b/tests/pcre-w
index 2c91e90..f66cd30 100755
--- a/tests/pcre-w
+++ b/tests/pcre-w
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
fail=0
diff --git a/tests/pcre-wx-backref b/tests/pcre-wx-backref
index 907c858..1ef708a 100755
--- a/tests/pcre-wx-backref
+++ b/tests/pcre-wx-backref
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
echo aa > in || framework_failure_
diff --git a/tests/pcre-z b/tests/pcre-z
index 4ce9a93..80d844a 100755
--- a/tests/pcre-z
+++ b/tests/pcre-z
@@ -1,6 +1,6 @@
#!/bin/sh
# Test Perl regex with NUL-separated input
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_pcre_
require_en_utf8_locale_
diff --git a/tests/posix-bracket b/tests/posix-bracket
index bca4303..679e39a 100755
--- a/tests/posix-bracket
+++ b/tests/posix-bracket
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
LC_ALL=C
export LC_ALL
diff --git a/tests/prefix-of-multibyte b/tests/prefix-of-multibyte
index 2228a22..e13aa25 100755
--- a/tests/prefix-of-multibyte
+++ b/tests/prefix-of-multibyte
@@ -1,6 +1,6 @@
#!/bin/sh
# This would mistakenly print a line prior to grep-2.18.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/proc b/tests/proc
index aeb4a50..34232de 100755
--- a/tests/proc
+++ b/tests/proc
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/r-dot b/tests/r-dot
index 29aedad..c69fc03 100755
--- a/tests/r-dot
+++ b/tests/r-dot
@@ -1,6 +1,6 @@
#!/bin/sh
# Check that "grep -r PAT" reads ".".
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
mkdir dir || framework_failure_
echo aaa > dir/a || framework_failure_
diff --git a/tests/repetition-overflow b/tests/repetition-overflow
index 38a652d..fe7e650 100755
--- a/tests/repetition-overflow
+++ b/tests/repetition-overflow
@@ -1,6 +1,6 @@
#!/bin/sh
# These would fail (i.e., match erroneously) prior to grep-2.11.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
xp1=4294967297 # 2^32+1
xp2=4294967298 # 2^32+2
diff --git a/tests/reversed-range-endpoints b/tests/reversed-range-endpoints
index 0737447..915def6 100755
--- a/tests/reversed-range-endpoints
+++ b/tests/reversed-range-endpoints
@@ -1,6 +1,6 @@
#!/bin/sh
# Ensure that an invalid range like [b-a] evokes exit status of 2.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/sjis-mb b/tests/sjis-mb
index abe2c0c..c9e452b 100755
--- a/tests/sjis-mb
+++ b/tests/sjis-mb
@@ -3,10 +3,10 @@
# in this encoding, an ASCII character is both a valid single-byte
# character, and a suffix of a valid double-byte character
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
-# Add "." to PATH for the use of get-mb-cur-max.
-path_prepend_ .
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
require_compiled_in_MB_support
require_timeout_
diff --git a/tests/skip-device b/tests/skip-device
index d6368f1..a920e8e 100755
--- a/tests/skip-device
+++ b/tests/skip-device
@@ -2,7 +2,7 @@
# grep must ignore --devices=ACTION (-D) when reading stdin
# For grep-2.11, this test would fail.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# Test both with no file argument, and with "-".
echo foo | grep -D skip foo - || fail=1
diff --git a/tests/skip-read b/tests/skip-read
index 1eef87e..e03237c 100755
--- a/tests/skip-read
+++ b/tests/skip-read
@@ -1,7 +1,7 @@
#!/bin/sh
# Check that grep skips reading in some cases.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/spencer1 b/tests/spencer1
index 65503d3..138bd75 100755
--- a/tests/spencer1
+++ b/tests/spencer1
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/spencer1-locale b/tests/spencer1-locale
index 3f202d8..62724a7 100755
--- a/tests/spencer1-locale
+++ b/tests/spencer1-locale
@@ -8,16 +8,17 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
# . . . and the following by Henry Spencer.
${AWK-awk} -v extra_locale=$LOCALE_FR_UTF8 \
- -f "$abs_srcdir/spencer1-locale.awk" "$abs_srcdir/spencer1.tests" \
- > spencer1-locale.script || fail=1
+ -f "$abs_srcdir/tests/spencer1-locale.awk" \
+ "$abs_srcdir/tests/spencer1.tests" \
+ > tests/spencer1-locale.script || fail=1
-${re_shell-${SHELL-sh}} spencer1-locale.script || fail=1
+${re_shell-${SHELL-sh}} tests/spencer1-locale.script || fail=1
Exit $fail
diff --git a/tests/spencer2 b/tests/spencer2
index c31a393..f43472b 100644
--- a/tests/spencer2
+++ b/tests/spencer2
@@ -8,7 +8,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/status b/tests/status
index 37703be..ff072e0 100755
--- a/tests/status
+++ b/tests/status
@@ -11,7 +11,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/surrogate-pair b/tests/surrogate-pair
index 38a2a55..470c5f5 100755
--- a/tests/surrogate-pair
+++ b/tests/surrogate-pair
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/symlink b/tests/symlink
index a915bbe..ad0fd83 100755
--- a/tests/symlink
+++ b/tests/symlink
@@ -18,7 +18,7 @@
# written by Paul Eggert
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
mkdir dir || framework_failure_
echo a > dir/a || framework_failure_
diff --git a/tests/triple-backref b/tests/triple-backref
index 3d36c05..3151d50 100755
--- a/tests/triple-backref
+++ b/tests/triple-backref
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
echo a > in || framework_failure_
diff --git a/tests/turkish-I b/tests/turkish-I
index 43becea..e457e57 100755
--- a/tests/turkish-I
+++ b/tests/turkish-I
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/turkish-I-without-dot b/tests/turkish-I-without-dot
index 69215de..c625629 100755
--- a/tests/turkish-I-without-dot
+++ b/tests/turkish-I-without-dot
@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_tr_utf8_locale_
require_compiled_in_MB_support
diff --git a/tests/turkish-eyes b/tests/turkish-eyes
index b57df8e..e323602 100755
--- a/tests/turkish-eyes
+++ b/tests/turkish-eyes
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_compiled_in_MB_support
diff --git a/tests/two-chars b/tests/two-chars
index 7ce7216..653f942 100755
--- a/tests/two-chars
+++ b/tests/two-chars
@@ -7,7 +7,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/two-files b/tests/two-files
index 1b52e3f..3ed8d58 100755
--- a/tests/two-files
+++ b/tests/two-files
@@ -8,7 +8,7 @@
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
fail=0
diff --git a/tests/unibyte-binary b/tests/unibyte-binary
index 11325ee..3791d2d 100755
--- a/tests/unibyte-binary
+++ b/tests/unibyte-binary
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_unibyte_locale
fail=0
diff --git a/tests/unibyte-bracket-expr b/tests/unibyte-bracket-expr
index 68c475c..c44331a 100755
--- a/tests/unibyte-bracket-expr
+++ b/tests/unibyte-bracket-expr
@@ -20,7 +20,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_ru_RU_koi8_r
LC_ALL=ru_RU.KOI8-R
export LC_ALL
diff --git a/tests/unibyte-negated-circumflex b/tests/unibyte-negated-circumflex
index 03e448a..7df22ad 100755
--- a/tests/unibyte-negated-circumflex
+++ b/tests/unibyte-negated-circumflex
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_unibyte_locale
fail=0
diff --git a/tests/utf8-bracket b/tests/utf8-bracket
index e85877c..f5c57d6 100755
--- a/tests/utf8-bracket
+++ b/tests/utf8-bracket
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
printf '1\n2\n' >in || framework_failure_
diff --git a/tests/warn-char-classes b/tests/warn-char-classes
index b1db240..8d0dd9b 100755
--- a/tests/warn-char-classes
+++ b/tests/warn-char-classes
@@ -1,6 +1,6 @@
#!/bin/sh
# Use of any --include or --exclude* option would segfault in 2.6 and 2.6.1
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
echo f > x || framework_failure_
echo b >> x || framework_failure_
diff --git a/tests/word-delim-multibyte b/tests/word-delim-multibyte
index f65298f..af677c7 100755
--- a/tests/word-delim-multibyte
+++ b/tests/word-delim-multibyte
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise \< and \> with multibyte data.
# Derived from http://savannah.gnu.org/bugs/?29537
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
diff --git a/tests/word-multi-file b/tests/word-multi-file
index 1816d60..c44bb03 100755
--- a/tests/word-multi-file
+++ b/tests/word-multi-file
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise the -w option on multiple files
# Derived from http://bugzilla.redhat.com/570500
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
mkdir a || framework_failure_
( cd a \
diff --git a/tests/word-multibyte b/tests/word-multibyte
index 9cbb71f..c327d2f 100755
--- a/tests/word-multibyte
+++ b/tests/word-multibyte
@@ -1,6 +1,9 @@
#!/bin/sh
# This would fail for grep-2.20
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
+
+# Add "./tests" to PATH for the use of get-mb-cur-max.
+path_prepend_ ./tests
require_en_utf8_locale_
diff --git a/tests/write-error-msg b/tests/write-error-msg
index 130648b..13d12d1 100755
--- a/tests/write-error-msg
+++ b/tests/write-error-msg
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
test -e /dev/full || skip_ your system lacks /dev/full
export LC_ALL=C
diff --git a/tests/yesno b/tests/yesno
index fd8d4ec..e5ca5fb 100755
--- a/tests/yesno
+++ b/tests/yesno
@@ -9,7 +9,7 @@
#
# This set of tests was started by Charles Levert.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
: ${VERBOSE=} # empty or "1"
failures=0
diff --git a/tests/z-anchor-newline b/tests/z-anchor-newline
index c12dd1e..eba0932 100755
--- a/tests/z-anchor-newline
+++ b/tests/z-anchor-newline
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. "${srcdir=.}/init.sh"; path_prepend_ ../src
+. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
require_en_utf8_locale_
require_compiled_in_MB_support