Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-06-14 13:58:25 +0300
committerJunio C Hamano <gitster@pobox.com>2017-06-15 19:10:47 +0300
commit17f2f88c9c9e0015cba6d962dc6d9e2329ddf713 (patch)
tree851b58e3a37492f23249c7fdc1b3e432c8085db4 /t/t7401-submodule-summary.sh
parent532139940c98a98bce2001bb495d75dec3d88e4d (diff)
t: move "git add submodule" into test blocks
Some submodule tests do some setup outside of a test_expect block. This is bad because we won't actually check the outcome of those commands. But it's doubly so because "git add submodule" now produces a warning to stderr, which is not suppressed by the test scripts in non-verbose mode. This patch does the minimal to fix the annoying warnings. All three of these scripts could use more cleanup of related setup. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7401-submodule-summary.sh')
-rwxr-xr-xt/t7401-submodule-summary.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh
index 366746f0d4..4e4c455502 100755
--- a/t/t7401-submodule-summary.sh
+++ b/t/t7401-submodule-summary.sh
@@ -241,9 +241,11 @@ EOF
test_cmp expected actual
"
-test_create_repo sm2 &&
-head7=$(add_file sm2 foo8 foo9) &&
-git add sm2
+test_expect_success 'create second submodule' '
+ test_create_repo sm2 &&
+ head7=$(add_file sm2 foo8 foo9) &&
+ git add sm2
+'
test_expect_success 'multiple submodules' "
git submodule summary >actual &&