X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/2299c463794f214b750ecc33e24779243ddc5aff..9938103fc5b4082d84f21eca0668b3b58913c895:/t/t2300-refresh-subdir.sh diff --git a/t/t2300-refresh-subdir.sh b/t/t2300-refresh-subdir.sh index bdd27c5..750e429 100755 --- a/t/t2300-refresh-subdir.sh +++ b/t/t2300-refresh-subdir.sh @@ -24,4 +24,25 @@ test_expect_success 'Refresh again' ' [ "$(stg status)" = "" ] ' +test_expect_success 'Refresh file in subdirectory' ' + echo foo3 >> foo.txt && + echo bar3 >> bar/bar.txt && + cd bar && + stg refresh bar.txt && + cd .. && + [ "$(stg status)" = "M foo.txt" ] +' + +test_expect_success 'Refresh whole subdirectory' ' + echo bar4 >> bar/bar.txt && + stg refresh bar && + [ "$(stg status)" = "M foo.txt" ] +' + +test_expect_success 'Refresh subdirectories recursively' ' + echo bar5 >> bar/bar.txt && + stg refresh . && + [ "$(stg status)" = "" ] +' + test_done