2 test_description
='Test the refresh command from a subdirectory'
6 test_expect_success
'Refresh from a subdirectory' '
10 echo bar >> bar/bar.txt &&
11 git add foo.txt bar/bar.txt &&
15 [ "$(stg status)" = "" ]
18 test_expect_success
'Refresh again' '
19 echo foo2 >> foo.txt &&
20 echo bar2 >> bar/bar.txt &&
24 [ "$(stg status)" = "" ]
27 test_expect_success
'Refresh file in subdirectory' '
28 echo foo3 >> foo.txt &&
29 echo bar3 >> bar/bar.txt &&
31 stg refresh bar.txt &&
33 [ "$(stg status)" = "M foo.txt" ]
36 test_expect_success
'Refresh whole subdirectory' '
37 echo bar4 >> bar/bar.txt &&
39 [ "$(stg status)" = "M foo.txt" ]
42 test_expect_success
'Refresh subdirectories recursively' '
43 echo bar5 >> bar/bar.txt &&
45 [ "$(stg status)" = "" ]