t/t6300: introduce test_bad_atom
commit0144f0de77edc96c6cd72ab9d50a68fc4c9c092e
authorKousik Sanagavarapu <five231003@gmail.com>
Mon, 25 Sep 2023 17:43:09 +0000 (25 23:13 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2023 21:52:33 +0000 (25 14:52 -0700)
tree7dbf8053b38a91a2ca65bda9292072617e9fa953
parent04830eb762c83609a63805716daedb36014f6b6c
t/t6300: introduce test_bad_atom

Introduce a new function "test_bad_atom", which is similar to
"test_atom()" but should be used to check whether the correct error
message is shown on stderr.

Like "test_atom", the new function takes three arguments. The three
arguments specify the ref, the format and the expected error message
respectively, with an optional fourth argument for tweaking
"test_expect_*" (which is by default "success").

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6300-for-each-ref.sh