2 test_description
='Test "stg edit" command line arguments'
6 test_expect_success
'Initialize repo' '
7 test_commit_bulk --message="p%s" 3 &&
13 test_expect_success
'Attempt to edit with no args and none applied' '
14 command_error stg edit 2>&1 |
15 grep "Cannot edit top patch because no patches are applied"
18 test_expect_success
'Attempt to edit non-existant patch name' '
19 command_error stg edit not-a-patch 2>&1 |
20 grep "not-a-patch: no such patch"
23 test_expect_success
'Attempt to edit multiple patches' '
24 command_error stg edit p1 p2 2>&1 |
25 grep "Cannot edit more than one patch"