git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 6/7] t/t3902-quoted: change from skip_all=* to prereq skip

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 11, 2010, 19:04 UTC
Message-ID
<1281553450-26467-7-git-send-email-avarab@gmail.com>
In-Reply-To
<7vd3tpxao1.fsf@alter.siamese.dyndns.org>

Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t3902-quoted.sh |   38 +++++++++++++++++++++-----------------
 1 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index 147e634..7d49469 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -15,11 +15,13 @@ LF='
 DQ='"'
 
 echo foo 2>/dev/null > "Name and an${HT}HT"
-test -f "Name and an${HT}HT" || {
-	# since FAT/NTFS does not allow tabs in filenames, skip this test
-	skip_all='Your filesystem does not allow tabs in filenames, test skipped.'
-	test_done
-}
+if ! test -f "Name and an${HT}HT"
+then
+	# FAT/NTFS does not allow tabs in filenames
+	say 'Your filesystem does not allow tabs in filenames'
+else
+	test_set_prereq TABS_IN_FILENAMES
+fi
 
 for_each_name () {
 	for name in \
@@ -31,7 +33,7 @@ for_each_name () {
 	done
 }
 
-test_expect_success setup '
+test_expect_success TABS_IN_FILENAMES 'setup' '
 
 	mkdir "$FN" &&
 	for_each_name "echo initial >\"\$name\""
@@ -45,6 +47,7 @@ test_expect_success setup '
 
 '
 
+test_expect_success TABS_IN_FILENAMES 'setup expected files' '
 cat >expect.quoted <<\EOF
 Name
 "Name and a\nLF"
@@ -72,75 +75,76 @@ With SP in it
 濱野/file
 濱野純
 EOF
+'
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.quoted current
 
 '
 
-test_expect_success 'setting core.quotepath' '
+test_expect_success TABS_IN_FILENAMES 'setting core.quotepath' '
 
 	git config --bool core.quotepath false
 
 '
 
-test_expect_success 'check fully quoted output from ls-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-files' '
 
 	git ls-files >current && test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-files' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-files' '
 
 	git diff --name-only >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-index' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-index' '
 
 	git diff --name-only HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from diff-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from diff-tree' '
 
 	git diff --name-only HEAD^ HEAD >current &&
 	test_cmp expect.raw current
 
 '
 
-test_expect_success 'check fully quoted output from ls-tree' '
+test_expect_success TABS_IN_FILENAMES 'check fully quoted output from ls-tree' '
 
 	git ls-tree --name-only -r HEAD >current &&
 	test_cmp expect.raw current
-- 
1.7.2.1.295.gdf931
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 24 of 25 in “tests: use skip_all=* to skip tests”
  1. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 10, 2010
  2. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  3. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  4. Junio C HamanoAug 11, 2010
  5. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  6. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  7. Junio C HamanoAug 11, 2010
  8. Ævar Arnfjörð BjarmasonAug 11, 2010
  9. Junio C HamanoAug 12, 2010
  10. Johannes SixtAug 11, 2010
  11. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  12. Junio C HamanoAug 11, 2010
  13. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  14. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 10, 2010
  15. Junio C HamanoAug 11, 2010
  16. 0/7 tests: use skip_all=* to skip testsÆvar Arnfjörð Bjarmason, Aug 11, 2010
  17. case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests)Raja R Harinath, Aug 12, 2010
  18. Ævar Arnfjörð BjarmasonAug 12, 2010
  19. 1/7 t/t1304-default-acl: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  20. 2/7 t/t5705-clone-2gb: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  21. 3/7 t/t7005-editor: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  22. 4/7 t/t5503-tagfollow: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  23. 5/7 t/t4016-diff-quote: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  24. 6/7 t/t3902-quoted: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010
  25. 7/7 t/t3300-funny-names: change from skip_all=* to prereq skipÆvar Arnfjörð Bjarmason, Aug 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.