summaryrefslogtreecommitdiff
path: root/t/t3001-ls-files-others-exclude.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-07-27 17:48:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-30 18:18:41 (GMT)
commitd3c6751b18170276f80e3578d16877d43ad22709 (patch)
tree6fbc19983489ba653109c8bee1b47d95254e7027 /t/t3001-ls-files-others-exclude.sh
parentffc6fa0e396238de3a30623912980263b4f283ab (diff)
downloadgit-d3c6751b18170276f80e3578d16877d43ad22709.zip
git-d3c6751b18170276f80e3578d16877d43ad22709.tar.gz
git-d3c6751b18170276f80e3578d16877d43ad22709.tar.bz2
tests: make use of the test_must_be_empty function
Change various tests that use an idiom of the form: >expect && test_cmp expect actual To instead use: test_must_be_empty actual The test_must_be_empty() wrapper was introduced in ca8d148daf ("test: test_must_be_empty helper", 2013-06-09). Many of these tests have been added after that time. This was mostly found with, and manually pruned from: git grep '^\s+>.*expect.* &&$' t Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 3fc484e..3b47647 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -210,8 +210,7 @@ test_expect_success 'subdirectory ignore (toplevel)' '
cd top &&
git ls-files -o --exclude-standard
) >actual &&
- >expect &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'subdirectory ignore (l1/l2)' '
@@ -219,8 +218,7 @@ test_expect_success 'subdirectory ignore (l1/l2)' '
cd top/l1/l2 &&
git ls-files -o --exclude-standard
) >actual &&
- >expect &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'subdirectory ignore (l1)' '
@@ -228,8 +226,7 @@ test_expect_success 'subdirectory ignore (l1)' '
cd top/l1 &&
git ls-files -o --exclude-standard
) >actual &&
- >expect &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'show/hide empty ignored directory (setup)' '
@@ -251,8 +248,7 @@ test_expect_success 'hide empty ignored directory with --no-empty-directory' '
cd top &&
git ls-files -o -i --exclude l1 --directory --no-empty-directory
) >actual &&
- >expect &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'show/hide empty ignored sub-directory (setup)' '
@@ -277,8 +273,7 @@ test_expect_success 'hide empty ignored sub-directory with --no-empty-directory'
cd top &&
git ls-files -o -i --exclude l1 --directory --no-empty-directory
) >actual &&
- >expect &&
- test_cmp expect actual
+ test_must_be_empty actual
'
test_expect_success 'pattern matches prefix completely' '