Improve test coverage for stg pull
[stgit.git] / t / t3301-edit-args.sh
blobccc4c3fcb0acdffd4746345c38d8daebd5e114d1
1 #!/bin/sh
2 test_description='Test "stg edit" command line arguments'
4 . ./test-lib.sh
6 test_expect_success 'Initialize repo' '
7 test_commit_bulk --message="p%s" 3 &&
8 stg init &&
9 stg uncommit -n 3 &&
10 stg pop -a
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"
28 test_done