diff --git a/tests/11-git.bats b/tests/11-git.bats index f6d43c4..b4f4d1a 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 { @@ -223,7 +223,15 @@ function setup_submodule { [ -f $TMPDIR/forgebuild-time ] } -@test "submodule is updated on first clone is subupdates is enabled" { +@test "submodule added after first clone is initialized" { + $FORGEBUILD -b $FORGEBUILDDIR time + [ -f $TMPDIR/forgebuild-time ] + setup_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 echo "SUBUPDATE" > README