Skip to content

Commit 27e25a8

Browse files
Denton-Lgitster
authored andcommitted
t3905: replace test -s with test_file_not_empty
In order to modernize the test script, replace `test -s` with test_file_not_empty(), which provides better diagnostic output in the case of failure. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 389ece4 commit 27e25a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/t3905-stash-include-untracked.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ test_expect_success 'stash save --include-untracked respects .gitignore' '
169169
mkdir ignored.d &&
170170
echo ignored >ignored.d/untracked &&
171171
git stash -u &&
172-
test -s ignored &&
173-
test -s ignored.d/untracked &&
174-
test -s .gitignore
172+
test_file_not_empty ignored &&
173+
test_file_not_empty ignored.d/untracked &&
174+
test_file_not_empty .gitignore
175175
'
176176

177177
test_expect_success 'stash save -u can stash with only untracked files different' '
@@ -189,9 +189,9 @@ test_expect_success 'stash save --all does not respect .gitignore' '
189189

190190
test_expect_success 'stash save --all is stash poppable' '
191191
git stash pop &&
192-
test -s ignored &&
193-
test -s ignored.d/untracked &&
194-
test -s .gitignore
192+
test_file_not_empty ignored &&
193+
test_file_not_empty ignored.d/untracked &&
194+
test_file_not_empty .gitignore
195195
'
196196

197197
test_expect_success 'stash push --include-untracked with pathspec' '

0 commit comments

Comments
 (0)