t7400: encapsulate setup code in test_expect_success
PATCH 1/1 t7400: encapsulate setup code in test_expect_success
When running t7400 in a shell you observe more output than expected:
...
ok 8 - setup - hide init subdirectory
ok 9 - setup - repository to add submodules to
ok 10 - submodule add
[master (root-commit) d79ce16] one
Author: A U Thor <[email protected]>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 11 - redirected submodule add does not show progress ok 12 - redirected submodule add --progress does show progress ok 13 - submodule add to .gitignored path fails
...
Fix the output by encapsulating the setup code in test_expect_success
--- t/t7400-submodule-basic.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
t/t7400-submodule-basic.sh +4 -2
@@ -126,8 +126,10 @@ test_expect_success 'submodule add' ' test_cmp empty untracked ' -test_create_repo parent && -test_commit -C parent one +test_expect_success 'setup parent and one repository for further tests' ' + test_create_repo parent && + test_commit -C parent one +' test_expect_success 'redirected submodule add does not show progress' ' git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
Signature · 1 line
2.18.0.rc1.244.gcf134e6275-goog
Quoted 15 lines · Stefan Beller
When running t7400 in a shell you observe more output than expected:
...
ok 10 - submodule add
[master (root-commit) d79ce16] one
Author: A U Thor <[email protected]>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 11 - redirected submodule add does not show progress
...
Fix the output by encapsulating the setup code intest_expect_successSigned-off-by Stefan Beller <[email protected]>---
t/t7400-submodule-basic.sh test_expect_success 'submodule add' ' · line 126
Quoted 3 lines
t/t7400-submodule-basic.sh +1
-2@@ -126,8 +126,10 @@ test_expect_success 'submodule add' ' -test_create_repo parent && -test_commit -C parent one +test_expect_success 'setup parent and one repository for further tests' '
Nit: "for further tests" is implied for actions performed by a "setup" function, so a bit redundant to say so.
Quoted 3 lines
t/t7400-submodule-basic.sh +3
-0+ test_create_repo parent && + test_commit -C parent one +'
PATCH 1/1 t7400: encapsulate setup code in test_expect_success
When running t7400 in a shell you observe more output than expected:
...
ok 8 - setup - hide init subdirectory
ok 9 - setup - repository to add submodules to
ok 10 - submodule add
[master (root-commit) d79ce16] one
Author: A U Thor <[email protected]>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 11 - redirected submodule add does not show progress ok 12 - redirected submodule add --progress does show progress ok 13 - submodule add to .gitignored path fails
...
Fix the output by encapsulating the setup code in test_expect_success
--- t/t7400-submodule-basic.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
t/t7400-submodule-basic.sh +4 -2
@@ -126,8 +126,10 @@ test_expect_success 'submodule add' ' test_cmp empty untracked ' -test_create_repo parent && -test_commit -C parent one +test_expect_success 'setup parent and one repository' ' + test_create_repo parent && + test_commit -C parent one +' test_expect_success 'redirected submodule add does not show progress' ' git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
Signature · 1 line
2.18.0.rc1.244.gcf134e6275-goog