t0000-basic: use realistic test script names in the verbose tests

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
SZEDER Gábor 2019-08-05 23:04:46 +02:00 committed by Junio C Hamano
parent 4d8ec15c66
commit 96f3ccc2ab

View File

@ -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_expect_success C_LOCALE_OUTPUT 'test --verbose' '
test_must_fail run_sub_test_lib_test \ 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 "passing test" true
test_expect_success "test with output" "echo foo" test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false test_expect_success "failing test" false
test_done test_done
EOF EOF
mv test-verbose/out test-verbose/out+ && mv t1234-verbose/out t1234-verbose/out+ &&
grep -v "^Initialized empty" test-verbose/out+ >test-verbose/out && grep -v "^Initialized empty" t1234-verbose/out+ >t1234-verbose/out &&
check_sub_test_lib_test test-verbose <<-\EOF check_sub_test_lib_test t1234-verbose <<-\EOF
> expecting success: true > expecting success: true
> ok 1 - passing test > ok 1 - passing test
> Z > Z
@ -303,14 +303,14 @@ test_expect_success C_LOCALE_OUTPUT 'test --verbose' '
test_expect_success 'test --verbose-only' ' test_expect_success 'test --verbose-only' '
test_must_fail run_sub_test_lib_test \ 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 && --verbose-only=2 <<-\EOF &&
test_expect_success "passing test" true test_expect_success "passing test" true
test_expect_success "test with output" "echo foo" test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false test_expect_success "failing test" false
test_done test_done
EOF 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 > ok 1 - passing test
> Z > Z
> expecting success: echo foo > expecting success: echo foo