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

[PATCH v2 1/2] t0000-basic: use realistic test script names in the verbose tests

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Aug 5, 2019, 21:04 UTC
Message-ID
<20190805210447.7169-2-szeder.dev@gmail.com>
In-Reply-To
<20190805210447.7169-1-szeder.dev@gmail.com>

Our test scripts are named something like 't1234-command.sh', but the script names used in 't0000-basic.sh' don't follow this naming convention. Normally this doesn't matter, because the test scripts themselves don't care how they are called. However, the next patch will start to include the test number in the test's verbose output, so the test script's name will matter in the two tests checking the verbose output.

Update the tests 'test --verbose' and 'test --verbose-only' to follow out test script naming convention.

Leave the other tests in 't0000' unchanged: changing the names of their test scripts would be only pointless code churn.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 t/t0000-basic.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index e89438e619..d2b3dde89e 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -276,15 +276,15 @@ test_expect_success 'pretend we have a mix of all possible results' "
 
 test_expect_success C_LOCALE_OUTPUT 'test --verbose' '
 	test_must_fail run_sub_test_lib_test \
-		test-verbose "test verbose" --verbose <<-\EOF &&
+		t1234-verbose "test verbose" --verbose <<-\EOF &&
 	test_expect_success "passing test" true
 	test_expect_success "test with output" "echo foo"
 	test_expect_success "failing test" false
 	test_done
 	EOF
-	mv test-verbose/out test-verbose/out+ &&
-	grep -v "^Initialized empty" test-verbose/out+ >test-verbose/out &&
-	check_sub_test_lib_test test-verbose <<-\EOF
+	mv t1234-verbose/out t1234-verbose/out+ &&
+	grep -v "^Initialized empty" t1234-verbose/out+ >t1234-verbose/out &&
+	check_sub_test_lib_test t1234-verbose <<-\EOF
 	> expecting success: true
 	> ok 1 - passing test
 	> Z
@@ -303,14 +303,14 @@ test_expect_success C_LOCALE_OUTPUT 'test --verbose' '
 
 test_expect_success 'test --verbose-only' '
 	test_must_fail run_sub_test_lib_test \
-		test-verbose-only-2 "test verbose-only=2" \
+		t2345-verbose-only-2 "test verbose-only=2" \
 		--verbose-only=2 <<-\EOF &&
 	test_expect_success "passing test" true
 	test_expect_success "test with output" "echo foo"
 	test_expect_success "failing test" false
 	test_done
 	EOF
-	check_sub_test_lib_test test-verbose-only-2 <<-\EOF
+	check_sub_test_lib_test t2345-verbose-only-2 <<-\EOF
 	> ok 1 - passing test
 	> Z
 	> expecting success: echo foo
-- 
2.23.0.rc1.309.g896d8c5f5f
Previous: SZEDER GáborNext: Johannes Schindelin
Message 7 of 9 in “test-lib-functions: show the test name at the start of verbose output”
  1. test-lib-functions: show the test name at the start of verbose outputSZEDER Gábor, Aug 3, 2019
  2. Johannes SchindelinAug 4, 2019
  3. SZEDER GáborAug 5, 2019
  4. Johannes SchindelinAug 5, 2019
  5. 0/2 tests: show the test name and number at the start of verbose outputSZEDER Gábor, Aug 5, 2019
  6. 2/2 tests: show the test name and number at the start of verbose outputSZEDER Gábor, Aug 5, 2019
  7. 1/2 t0000-basic: use realistic test script names in the verbose testsSZEDER Gábor, Aug 5, 2019
  8. Johannes SchindelinAug 8, 2019
  9. Junio C HamanoAug 8, 2019

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.