X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/5f594e90e9a0867e1b87ffb8b0a077152246b56c..0e84c57c4a9d3a198caa4ae2da2a6670e57ad917:/t/t0001-subdir-branches.sh diff --git a/t/t0001-subdir-branches.sh b/t/t0001-subdir-branches.sh index 0eed3a4..5ea787e 100755 --- a/t/t0001-subdir-branches.sh +++ b/t/t0001-subdir-branches.sh @@ -14,34 +14,30 @@ containing slashes (that is, branches living in a subdirectory of test_expect_success 'Create a patch' \ 'stg init && echo "foo" > foo.txt && - git add foo.txt && + stg add foo.txt && stg new foo -m "Add foo.txt" && stg refresh' -test_expect_success 'Old and new id with non-slashy branch' \ - 'stg id foo && - stg id foo// && - stg id foo/ && - stg id foo//top && - stg id foo/top && - stg id foo@master && - stg id foo@master//top && - stg id foo@master/top' +test_expect_success 'Try id with non-slashy branch' \ + 'stg id && + stg id foo && + stg id foo^ && + stg id master:foo && + stg id master:foo^' test_expect_success 'Clone branch to slashier name' \ 'stg branch --clone x/y/z' -test_expect_success 'Try new form of id with slashy branch' \ +test_expect_success 'Try new id with slashy branch' \ 'stg id foo && - stg id foo// && - stg id foo//top && - stg id foo@x/y/z && - stg id foo@x/y/z//top' + stg id foo^ && + stg id x/y/z:foo && + stg id x/y/z:foo^' test_expect_success 'Try old id with slashy branch' ' - ! stg id foo/ && - ! stg id foo/top && - ! stg id foo@x/y/z/top + command_error stg id foo/ && + command_error stg id foo/top && + command_error stg id foo@x/y/z/top ' test_expect_success 'Create patch in slashy branch' \ @@ -51,11 +47,11 @@ test_expect_success 'Create patch in slashy branch' \ test_expect_success 'Rename branches' \ 'stg branch --rename master goo/gaa && - ! git show-ref --verify --quiet refs/heads/master && + must_fail git show-ref --verify --quiet refs/heads/master && stg branch --rename goo/gaa x1/x2/x3/x4 && - ! git show-ref --verify --quiet refs/heads/goo/gaa && + must_fail git show-ref --verify --quiet refs/heads/goo/gaa && stg branch --rename x1/x2/x3/x4 servant && - ! git show-ref --verify --quiet refs/heads/x1/x2/x3/x4 + must_fail git show-ref --verify --quiet refs/heads/x1/x2/x3/x4 ' test_done