3 test_description
="Test 'stg id'"
6 test_expect_success
'Test on uninitialized repo' '
10 test_expect_success
'Init repo' '
11 echo "foo" > foo.txt &&
13 git commit -m "initial" &&
16 echo "line $i" >> foo.txt &&
17 stg new -m "patch-$i" &&
22 test_expect_success
'Too many arguments' '
23 command_error stg id patch-1 patch-2 2>&1 |
24 grep -e "incorrect number of arguments"
27 test_expect_success
'Provide patch argument' '
28 test "$(echo $(stg id))" = "$(echo $(stg id $(stg top)))"