summaryrefslogtreecommitdiff
path: root/t/t3905-stash-include-untracked.sh
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2021-02-08 23:28:52 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-11 13:34:58 -0800
commit8c2462d1fe01fbc509827591f6b287d8af245ae1 (patch)
treedc2b4ae5b24a33913ab5f8ee5634e2cf420f0af9 /t/t3905-stash-include-untracked.sh
parentt3905: replace test -s with test_file_not_empty (diff)
downloadtgif-8c2462d1fe01fbc509827591f6b287d8af245ae1.tar.xz
t3905: use test_cmp() to check file contents
Modernize the script by doing file content comparisons using test_cmp() instead of `test x = "$(cat file)"`. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3905-stash-include-untracked.sh')
-rwxr-xr-xt/t3905-stash-include-untracked.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh
index c87ac24042..b26a97aef4 100755
--- a/t/t3905-stash-include-untracked.sh
+++ b/t/t3905-stash-include-untracked.sh
@@ -103,8 +103,10 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
git stash pop &&
git status --porcelain >actual &&
test_cmp expect actual &&
- test "1" = "$(cat file2)" &&
- test untracked = "$(cat untracked/untracked)"
+ echo 1 >expect_file2 &&
+ test_cmp expect_file2 file2 &&
+ echo untracked >untracked_expect &&
+ test_cmp untracked_expect untracked/untracked
'
test_expect_success 'clean up untracked/ directory to prepare for next tests' '