summaryrefslogtreecommitdiff
path: root/t/t7004-tag.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7004-tag.sh')
-rwxr-xr-xt/t7004-tag.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 3dd2f51..cf3469b 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -23,8 +23,8 @@ test_expect_success 'listing all tags in an empty tree should succeed' '
'
test_expect_success 'listing all tags in an empty tree should output nothing' '
- test `git tag -l | wc -l` -eq 0 &&
- test `git tag | wc -l` -eq 0
+ test $(git tag -l | wc -l) -eq 0 &&
+ test $(git tag | wc -l) -eq 0
'
test_expect_success 'looking for a tag in an empty tree should fail' \
@@ -72,8 +72,8 @@ test_expect_success 'listing all tags if one exists should succeed' '
'
test_expect_success 'listing all tags if one exists should output that tag' '
- test `git tag -l` = mytag &&
- test `git tag` = mytag
+ test $(git tag -l) = mytag &&
+ test $(git tag) = mytag
'
# pattern matching:
@@ -83,7 +83,7 @@ test_expect_success 'listing a tag using a matching pattern should succeed' \
test_expect_success \
'listing a tag using a matching pattern should output that tag' \
- 'test `git tag -l mytag` = mytag'
+ 'test $(git tag -l mytag) = mytag'
# todo: git tag -l now returns always zero, when fixed, change this test
test_expect_success \
@@ -92,7 +92,7 @@ test_expect_success \
test_expect_success \
'listing tags using a non-matching pattern should output nothing' \
- 'test `git tag -l xxx | wc -l` -eq 0'
+ 'test $(git tag -l xxx | wc -l) -eq 0'
# special cases for creating tags:
@@ -102,13 +102,13 @@ test_expect_success \
test_expect_success \
'trying to create a tag with a non-valid name should fail' '
- test `git tag -l | wc -l` -eq 1 &&
+ test $(git tag -l | wc -l) -eq 1 &&
test_must_fail git tag "" &&
test_must_fail git tag .othertag &&
test_must_fail git tag "other tag" &&
test_must_fail git tag "othertag^" &&
test_must_fail git tag "other~tag" &&
- test `git tag -l | wc -l` -eq 1
+ test $(git tag -l | wc -l) -eq 1
'
test_expect_success 'creating a tag using HEAD directly should succeed' '
@@ -1558,4 +1558,12 @@ test_expect_success '--no-merged show unmerged tags' '
test_cmp expect actual
'
+test_expect_success 'ambiguous branch/tags not marked' '
+ git tag ambiguous &&
+ git branch ambiguous &&
+ echo ambiguous >expect &&
+ git tag -l ambiguous >actual &&
+ test_cmp expect actual
+'
+
test_done