chiark / gitweb /
New test: try "stg refresh" in a subdirectory
[stgit] / t / t2300-refresh-subdir.sh
1 #!/bin/sh
2 test_description='Test the refresh command from a subdirectory'
3 . ./test-lib.sh
4 stg init
5
6 test_expect_success 'Refresh from a subdirectory' '
7     stg new foo -m foo &&
8     echo foo >> foo.txt &&
9     mkdir bar &&
10     echo bar >> bar/bar.txt &&
11     stg add foo.txt bar/bar.txt &&
12     cd bar &&
13     stg refresh &&
14     cd .. &&
15     [ "$(stg status)" = "" ]
16 '
17
18 test_expect_failure 'Refresh again' '
19     echo foo2 >> foo.txt &&
20     echo bar2 >> bar/bar.txt &&
21     cd bar &&
22     stg refresh &&
23     cd .. &&
24     [ "$(stg status)" = "" ]
25 '
26
27 test_done