Ensure submodules are initialized when added after first clone (close #17)

This commit is contained in:
southerntofu 2022-01-09 15:50:34 +01:00
parent d19e698aea
commit faba27a6bb
1 changed files with 10 additions and 2 deletions

View File

@ -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