summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2021-02-09 07:28:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-11 21:34:58 (GMT)
commit27e25a8cbfff4a53eb1bf6bac8486af6a6a1201d (patch)
tree2095ddbe14ad01d5196139ea035efdd42b73504b
parent389ece402292f066be6bb4a22ac72682a6a2aea6 (diff)
downloadgit-27e25a8cbfff4a53eb1bf6bac8486af6a6a1201d.zip
git-27e25a8cbfff4a53eb1bf6bac8486af6a6a1201d.tar.gz
git-27e25a8cbfff4a53eb1bf6bac8486af6a6a1201d.tar.bz2
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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t3905-stash-include-untracked.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh
index f008e5d..c87ac24 100755
--- a/t/t3905-stash-include-untracked.sh
+++ b/t/t3905-stash-include-untracked.sh
@@ -169,9 +169,9 @@ test_expect_success 'stash save --include-untracked respects .gitignore' '
mkdir ignored.d &&
echo ignored >ignored.d/untracked &&
git stash -u &&
- test -s ignored &&
- test -s ignored.d/untracked &&
- test -s .gitignore
+ test_file_not_empty ignored &&
+ test_file_not_empty ignored.d/untracked &&
+ test_file_not_empty .gitignore
'
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' '
test_expect_success 'stash save --all is stash poppable' '
git stash pop &&
- test -s ignored &&
- test -s ignored.d/untracked &&
- test -s .gitignore
+ test_file_not_empty ignored &&
+ test_file_not_empty ignored.d/untracked &&
+ test_file_not_empty .gitignore
'
test_expect_success 'stash push --include-untracked with pathspec' '