Skip to content
  • William Chargin's avatar
    t: factor out FUNNYNAMES as shared lazy prereq · 6ec63305
    William Chargin authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarWilliam Chargin <wchargin@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    6ec63305