| 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='Run "stg diff"' |
| 4 | |
| 5 | . ./test-lib.sh |
| 6 | |
| 7 | test_expect_success 'Diff with no StGit data' ' |
| 8 | stg diff |
| 9 | ' |
| 10 | |
| 11 | test_expect_success 'Make some local changes' ' |
| 12 | echo foo >> foo.txt && |
| 13 | git add foo.txt |
| 14 | ' |
| 15 | |
| 16 | test_expect_success 'Diff with some local changes' ' |
| 17 | stg diff |
| 18 | ' |
| 19 | |
| 20 | test_expect_success 'Initialize StGit stuff' ' |
| 21 | stg init && |
| 22 | stg new foo -m foo |
| 23 | ' |
| 24 | |
| 25 | test_expect_success 'Diff with some local changes' ' |
| 26 | stg diff |
| 27 | ' |
| 28 | |
| 29 | test_expect_success 'Refresh patch' ' |
| 30 | stg refresh |
| 31 | ' |
| 32 | |
| 33 | test_expect_success 'Diff with no local changes' ' |
| 34 | stg diff |
| 35 | ' |
| 36 | |
| 37 | test_done |