]> git.ipfire.org Git - thirdparty/git.git/commit
t6300-for-each-ref: fix "more than one quoting style" tests
authorSZEDER Gábor <szeder.dev@gmail.com>
Tue, 13 Feb 2018 00:36:01 +0000 (01:36 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Feb 2018 18:45:26 +0000 (10:45 -0800)
commit2708ef4af6ed60b89e93de72673e7b785b93d760
tree82c01026ce0e911e7453446e0506ea70141fd239
parent8279ed033f703d4115bee620dccd32a9ec94d9aa
t6300-for-each-ref: fix "more than one quoting style" tests

'git for-each-ref' should error out when invoked with more than one
quoting style options.  The tests checking this have two issues:

  - They run 'git for-each-ref' upstream of a pipe, hiding its exit
    code, thus don't actually checking that 'git for-each-ref' exits
    with error code.

  - They check the error message in a rather roundabout way.

Ensure that 'git for-each-ref' exits with an error code using the
'test_must_fail' helper function, and check its error message by
grepping its saved standard error.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6300-for-each-ref.sh