File: t1206-push-hidden.sh

package info (click to toggle)
stgit 0.19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,748 kB
  • sloc: python: 10,558; sh: 5,739; lisp: 2,678; makefile: 142; perl: 42
file content (28 lines) | stat: -rwxr-xr-x 694 bytes parent folder | download | duplicates (5)
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