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