diff options
author | Kevin Ballard <kevin@sb.org> | 2014-09-02 15:52:56 -0700 |
---|---|---|
committer | Kevin Ballard <kevin@sb.org> | 2014-09-02 15:52:56 -0700 |
commit | 1c4223889bd729ee83aa21a3450dc28f92ade641 (patch) | |
tree | d78d920b8e898b65c27be49e4f3b785cbb999cbb | |
parent | 90a4fd34d23e76b7934b040db3628d7884040267 (diff) |
Fix test output for `complete -e` tests
GNU sort behaves stupidly when LC_ALL is not C. This caused the test
output to be sorted wrong.
-rwxr-xr-x | tests/test.fish | 4 | ||||
-rwxr-xr-x | tests/test6.in | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/test.fish b/tests/test.fish index 7573b400..2f2b8533 100755 --- a/tests/test.fish +++ b/tests/test.fish @@ -61,14 +61,14 @@ for i in *.in else set res fail echo Output differs for file $i. Diff follows: - diff tmp.out $template_out + diff -u tmp.out $template_out end if diff tmp.err $template_err >/dev/null else set res fail echo Error output differs for file $i. Diff follows: - diff tmp.err $template_err + diff -u tmp.err $template_err end if test (cat tmp.status) = (cat $template_status) diff --git a/tests/test6.in b/tests/test6.in index 69f42d56..93be594a 100755 --- a/tests/test6.in +++ b/tests/test6.in @@ -17,6 +17,12 @@ complete -C'BBBB -' # Test that erasing completions works correctly echo +function sort + # GNU sort is really stupid, a non-C locale seems to make it assume --dictionary-order + # If I wanted --dictionary-order, I would have specified --dictionary-order! + env LC_ALL=C sort $argv +end + complete -c CCCC -l bar complete -c CCCC -l baz complete -c CCCC -o bar |