mirror of
https://github.com/git/git.git
synced 2024-11-15 15:03:47 +01:00
t1400: use test_must_be_empty
Use test_must_be_empty instead of reading the file and comparing its contents to an empty string. That's more efficient, as the function only needs built-in meta-data only check in the usual case, and provides nicer debug output otherwise. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6e4826ea75
commit
c93a5aaec8
@ -378,13 +378,13 @@ test_expect_success 'Query "master@{May 26 2005 23:32:00}" (exactly history star
|
||||
test_when_finished "rm -f o e" &&
|
||||
git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
|
||||
test $C = $(cat o) &&
|
||||
test "" = "$(cat e)"
|
||||
test_must_be_empty e
|
||||
'
|
||||
test_expect_success 'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' '
|
||||
test_when_finished "rm -f o e" &&
|
||||
git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
|
||||
test $A = $(cat o) &&
|
||||
test "" = "$(cat e)"
|
||||
test_must_be_empty e
|
||||
'
|
||||
test_expect_success 'Query "master@{2005-05-26 23:33:01}" (middle of history with gap)' '
|
||||
test_when_finished "rm -f o e" &&
|
||||
@ -396,13 +396,13 @@ test_expect_success 'Query "master@{2005-05-26 23:38:00}" (middle of history)' '
|
||||
test_when_finished "rm -f o e" &&
|
||||
git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
|
||||
test $Z = $(cat o) &&
|
||||
test "" = "$(cat e)"
|
||||
test_must_be_empty e
|
||||
'
|
||||
test_expect_success 'Query "master@{2005-05-26 23:43:00}" (exact end of history)' '
|
||||
test_when_finished "rm -f o e" &&
|
||||
git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
|
||||
test $E = $(cat o) &&
|
||||
test "" = "$(cat e)"
|
||||
test_must_be_empty e
|
||||
'
|
||||
test_expect_success 'Query "master@{2005-05-28}" (past end of history)' '
|
||||
test_when_finished "rm -f o e" &&
|
||||
|
Loading…
Reference in New Issue
Block a user