chainlint.pl: add parser to identify test definitions
commitd99ebd6d2e57baa3ec45b939d40cf939b85301a3
authorEric Sunshine <sunshine@sunshineco.com>
Thu, 1 Sep 2022 00:29:43 +0000 (1 00:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Sep 2022 17:07:40 +0000 (1 10:07 -0700)
tree5fe7842a7ef41219250830d9bb51405dbc605a17
parent6d932e92fcb49b59b780bc018fe550d867bb3d84
chainlint.pl: add parser to identify test definitions

Finish fleshing out chainlint.pl by adding ScriptParser, a parser which
scans shell scripts for tests defined by test_expect_success() and
test_expect_failure(), plucks the test body from each definition, and
passes it to TestParser for validation. It recognizes test definitions
not only at the top-level of test scripts but also tests synthesized
within compound commands such as loops and function.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/chainlint.pl