Skip to content

Commit 8c2462d

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 27e25a8 commit 8c2462d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t3905-stash-include-untracked.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
103103
git stash pop &&
104104
git status --porcelain >actual &&
105105
test_cmp expect actual &&
106-
test "1" = "$(cat file2)" &&
107-
test untracked = "$(cat untracked/untracked)"
106+
echo 1 >expect_file2 &&
107+
test_cmp expect_file2 file2 &&
108+
echo untracked >untracked_expect &&
109+
test_cmp untracked_expect untracked/untracked
108110
'
109111

110112
test_expect_success 'clean up untracked/ directory to prepare for next tests' '

0 commit comments

Comments
 (0)