diff options
author | William Chargin <wchargin@gmail.com> | 2018-08-06 18:35:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-06 20:35:15 (GMT) |
commit | 6ec633059ad0b17850ad18c7325678d6c845b74c (patch) | |
tree | 64f5d0afb47d1427a3b3aac6474f5bfbb34f5337 /t/t9902-completion.sh | |
parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) | |
download | git-6ec633059ad0b17850ad18c7325678d6c845b74c.zip git-6ec633059ad0b17850ad18c7325678d6c845b74c.tar.gz git-6ec633059ad0b17850ad18c7325678d6c845b74c.tar.bz2 |
t: factor out FUNNYNAMES as shared lazy prereq
A fair number of tests need to check that the filesystem supports file
names including "funny" characters, like newline, tab, and double-quote.
Jonathan Nieder suggested that this be extracted into a lazy prereq in
the top-level `test-lib.sh`. This patch effects that change.
The FUNNYNAMES prereq now uniformly requires support for newlines, tabs,
and double-quotes in filenames. This very slightly decreases the power
of some tests, which might have run previously on a system that supports
(e.g.) newlines and tabs but not double-quotes, but now will not. This
seems to me like an acceptable tradeoff for consistency.
One test (`t/t9902-completion.sh`) defined FUNNYNAMES to further require
the separators \034 through \037, the test for which was implemented
using the Bash-specific $'\034' syntax. I've elected to leave this one
as is, renaming it to FUNNIERNAMES.
After this patch, `git grep 'test_\(set\|lazy\)_prereq.*FUNNYNAMES'` has
only one result.
Signed-off-by: William Chargin <wchargin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9902-completion.sh')
-rwxr-xr-x | t/t9902-completion.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index a28640c..532df85 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1242,7 +1242,7 @@ test_expect_success 'setup for path completion tests' ' touch BS\\dir/DQ\"file \ '$'separators\034in\035dir/sep\036in\037file'' then - test_set_prereq FUNNYNAMES + test_set_prereq FUNNIERNAMES else rm -rf BS\\dir '$'separators\034in\035dir'' fi @@ -1284,7 +1284,7 @@ test_expect_success '__git_complete_index_file - UTF-8 in ls-files output' ' test_path_completion árvíztűrő/С "árvíztűrő/Сайн яваарай" ' -test_expect_success FUNNYNAMES \ +test_expect_success FUNNIERNAMES \ '__git_complete_index_file - C-style escapes in ls-files output' ' test_path_completion BS \ BS\\dir && @@ -1296,7 +1296,7 @@ test_expect_success FUNNYNAMES \ BS\\dir/DQ\"file ' -test_expect_success FUNNYNAMES \ +test_expect_success FUNNIERNAMES \ '__git_complete_index_file - \nnn-escaped characters in ls-files output' ' test_path_completion sep '$'separators\034in\035dir'' && test_path_completion '$'separators\034i'' \ |