]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t0020-crlf: check the right file
authorSZEDER Gábor <szeder.dev@gmail.com>
Wed, 22 Aug 2018 12:44:36 +0000 (14:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Aug 2018 16:08:08 +0000 (09:08 -0700)
In the test 'checkout with autocrlf=input' in 't0020-crlf.sh', one of
the 'has_cr' checks looks at the non-existing file 'two' instead of
'dir/two'.  The test still succeeds, without actually checking what it
was supposed to, because this check is expected to fail anyway.

As a minimal fix, fix the name of the file to be checked.

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

index 144fdcde7bd5c66467142f18713d4ec6bfccb071..f7a6a3ce7dc2b18f9fd9c351998992f34ead9518 100755 (executable)
@@ -148,7 +148,7 @@ test_expect_success 'checkout with autocrlf=input' '
        git config core.autocrlf input &&
        git read-tree --reset -u HEAD &&
        test_must_fail has_cr one &&
-       test_must_fail has_cr two &&
+       test_must_fail has_cr dir/two &&
        git update-index -- one dir/two &&
        test "$one" = $(git hash-object --stdin <one) &&
        test "$two" = $(git hash-object --stdin <dir/two) &&