From 88ccb37dfd90d4ff284d5ada5da638c5b6c70c0c Mon Sep 17 00:00:00 2001 From: southerntofu Date: Wed, 12 Jan 2022 19:18:43 +0100 Subject: [PATCH] TEST: submodule added after first clone is not updated if subupdates is disabled --- tests/11-git.bats | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/11-git.bats b/tests/11-git.bats index b4f4d1a..6ad4d01 100755 --- a/tests/11-git.bats +++ b/tests/11-git.bats @@ -47,7 +47,7 @@ function setup { function teardown { cd $ORIGDIR - #clean + clean } function clean { @@ -231,6 +231,18 @@ function setup_submodule { [[ "$(cat $FORGEBUILDDIR/.time/sub/README)" = "SUB" ]] } +@test "submodule added after first clone is not updated if subupdates is disabled" { + $FORGEBUILD -b $FORGEBUILDDIR time + [ -f $TMPDIR/forgebuild-time ] + setup_submodule + cd $SUBMODULE + echo "SUBUPDATE" > README + git add README + git commit -m "update submodule" + $FORGEBUILD -b $FORGEBUILDDIR time + [[ "$(cat $FORGEBUILDDIR/.time/sub/README)" = "SUB" ]] +} + @test "submodule is updated on first clone if subupdates is enabled" { setup_submodule cd $SUBMODULE