Skip to content

Commit eab648d

Browse files
committed
t2021: do not negate test_path_is_dir
In this test, a path (some_dir) that is originally a directory is to be removed and then to be replaced with a file of the same name. The expectation is that the path becomes a file at the end. However, "! test_path_is_dir some_dir" is used to catch a breakage that leaves the path as a directory. But as with all the "test_path_is..." helpers, this use of the helper makes it loud when the expectation (i.e. it is a directory) is met, and otherwise is silent when it is not---this does not help debugging. Be more explicit and state that we expect the path to become a file. Signed-off-by: Junio C Hamano <[email protected]>
1 parent c205923 commit eab648d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t2021-checkout-overwrite.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test_expect_success 'checkout --overwrite-ignore should succeed if only ignored
7777
echo autogenerated information >some_dir/ignore &&
7878
echo ignore >.git/info/exclude &&
7979
git checkout --overwrite-ignore df_conflict &&
80-
! test_path_is_dir some_dir
80+
test_path_is_file some_dir
8181
'
8282

8383
test_done

0 commit comments

Comments
 (0)