diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-11-08 17:10:33 +0300 |
---|---|---|
committer | Taylor Blau <me@ttaylorr.com> | 2022-11-08 22:55:30 +0300 |
commit | 44874cbd19afb6ee6fa7dad01dbe6eec161cc94b (patch) | |
tree | 491ecacb226be1904ffde2a26930ec215f307d1d /t/t7400-submodule-basic.sh | |
parent | cc74a4ac7255510b4a928d4973dcfcc746d74e8f (diff) |
submodule tests: add tests for top-level flag output
Exhaustively test for how combining various "mixed-level" "git
submodule" option works. "Mixed-level" here means options that are
accepted by a mixture of the top-level "submodule" command, and
e.g. the "status" sub-command.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 't/t7400-submodule-basic.sh')
-rwxr-xr-x | t/t7400-submodule-basic.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index a989aafaf5..eae6a46ef3 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -579,6 +579,16 @@ test_expect_success 'status should be "modified" after submodule commit' ' grep "^+$rev2" list ' +test_expect_success '"submodule --cached" command forms should be identical' ' + git submodule status --cached >expect && + + git submodule --cached >actual && + test_cmp expect actual && + + git submodule --cached status >actual && + test_cmp expect actual +' + test_expect_success 'the --cached sha1 should be rev1' ' git submodule --cached status >list && grep "^+$rev1" list |