1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/bin/sh
test_description='Test "stg push" with hidden patches'
. ./test-lib.sh
test_expect_success 'Initialize StGit stack' '
stg init &&
echo foo > foo.txt &&
stg add foo.txt &&
stg new -m hidden-patch &&
stg refresh &&
stg pop &&
stg hide hidden-patch &&
test "$(echo $(stg series --all))" = "! hidden-patch"
'
test_expect_success 'Push an implicitly named hidden patch (should fail)' '
command_error stg push &&
test "$(echo $(stg series --all))" = "! hidden-patch"
'
test_expect_failure 'Push an explicitly named hidden patch (should work)' '
stg push hidden-patch &&
test "$(echo $(stg series --all))" = "> hidden-patch"
'
test_done
|