t7411: merge tests 5 and 6
Tests 5 and 6 check for the effects of the same commit, merge the two tests to make it more straightforward to clean things up after the test has finished. The cleanup will be added in a future commit. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Antonio Ospite committed
Oct 5, 2018 at 15:05 UTC
d1b13df5273bc6720c0f73f15efe87fa7c181f23
1 file changed
+5
-13
t/t7411-submodule-config.sh
+5
-13
@@ -82,29 +82,21 @@ Submodule name: 'a' for path 'b'
82
Submodule name: 'submodule' for path 'submodule'
83
EOF
84
85
-test_expect_success 'error in one submodule config lets continue' '
85
+test_expect_success 'error in history of one submodule config lets continue, stderr message contains blob ref' '
86
(cd super &&
87
cp .gitmodules .gitmodules.bak &&
88
echo " value = \"" >>.gitmodules &&
89
git add .gitmodules &&
90
mv .gitmodules.bak .gitmodules &&
91
git commit -m "add error" &&
92
- test-tool submodule-config \
93
- HEAD b \
94
- HEAD submodule \
95
- >actual &&
96
- test_cmp expect_error actual
97
- )
98
-'
99
-
100
-test_expect_success 'error message contains blob reference' '
101
- (cd super &&
92
sha1=$(git rev-parse HEAD) &&
93
test-tool submodule-config \
94
HEAD b \
95
HEAD submodule \
106
- 2>actual_err &&
107
- test_i18ngrep "submodule-blob $sha1:.gitmodules" actual_err >/dev/null
96
+ >actual \
97
+ 2>actual_stderr &&
98
+ test_cmp expect_error actual &&
99
+ test_i18ngrep "submodule-blob $sha1:.gitmodules" actual_stderr >/dev/null
100
)
101
'
102