TEST: submodule added after first clone is not updated if subupdates is disabled

This commit is contained in:
southerntofu 2022-01-12 19:18:43 +01:00
parent faba27a6bb
commit 88ccb37dfd
1 changed files with 13 additions and 1 deletions

View File

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