diff options
author | Jim Meyering <meyering@fb.com> | 2015-07-17 14:02:35 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2015-07-17 14:13:43 -0700 |
commit | d4582ed5a6141d5935d962335ead2705624f7e13 (patch) | |
tree | 83f5f4e25e2202208b2bca6370fdfc999e3af62f /tests/include-exclude | |
parent | c5c70eae261133d71a9436557d998a48aaf0a5fe (diff) | |
download | grep-d4582ed5a6141d5935d962335ead2705624f7e13.tar.gz |
tests: avoid FS-dependent false-positive failure
* tests/include-exclude: Sort file name list, so that this test
is not sensitive to the order in which those names are returned
via readdir. I noticed the failure on a Fedora 21 system using ext4.
Also fix a typo: s/framework_failure+/framework_failure_/
Diffstat (limited to 'tests/include-exclude')
-rwxr-xr-x | tests/include-exclude | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/include-exclude b/tests/include-exclude index 8b2f5aa6..cdbb9d60 100755 --- a/tests/include-exclude +++ b/tests/include-exclude @@ -14,7 +14,7 @@ printf '%s\n' x/a:aaa x/b:bbb > exp-not-dir || framework_failure_ printf '%s\n' x/a:aaa > exp-a || framework_failure_ printf '%s\n' a:aaa > exp-aa || framework_failure_ printf '%s\n' aaa > exp-aaa || framework_failure_ -printf '%s\n' ./x/a ./x/b ./x/dir/d > exp-dotnames || framework_failure+ +printf '%s\n' ./x/a ./x/b ./x/dir/d | sort > exp-dotnames || framework_failure_ grep -r --exclude='a*' . x > out || fail=1 sort out > k && mv k out @@ -59,7 +59,7 @@ compare exp-a out || fail=1 (cd x && grep -r --exclude-dir=. '^aaa$') > out || fail=1 compare exp-aa out || fail=1 -grep --exclude=- '^aaa$' - < x/a > out || fail=1 +grep --exclude=- '^aaa$' - < x/a | sort > out || fail=1 compare exp-aaa out || fail=1 for exclude in 'x' 'x*'; do |