Skip to content
  • Carlo Arenas's avatar
    t4210: detect REG_ILLSEQ dynamically and skip affected tests · c4c2a96e
    Carlo Arenas authored and Junio C Hamano's avatar Junio C Hamano committed
    7187c7bb (t4210: skip i18n tests that don't work on FreeBSD, 2019-11-27)
    adds a REG_ILLSEQ prerequisite, and to do that copies the common branch in
    test-lib and expands it to include it in a special case for FreeBSD.
    
    Instead; test for it using a previously added extension to test-tool and
    use that, together with a function that identifies when regcomp/regexec
    will be called with broken patterns to avoid any test that would otherwise
    rely on undefined behaviour.
    
    The description of the first test which wasn't accurate has been corrected,
    and the test rearranged for clarity, including a helper function that avoids
    overly long lines.
    
    Only the affected engines will have their tests suppressed, also including
    "fixed" if the PCRE optimization that uses LIBPCRE2 since b65abcaf
    
    
    (grep: use PCRE v2 for optimized fixed-string search, 2019-07-01) is not
    available.
    
    Helped-by: default avatarEric Sunshine <sunshine@sunshineco.com>
    Signed-off-by: default avatarCarlo Marcelo Arenas Belón <carenas@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c4c2a96e