Merge branch 'bw/pathspec-cleanup'
[gitweb.git] / t / t7004-tag.sh
index 8b0f71a2ac15d65f977b0daa2a53ad47b64a043a..07869b0c09da1313dd5564c2318dc5d44818f3a9 100755 (executable)
@@ -27,6 +27,30 @@ test_expect_success 'listing all tags in an empty tree should output nothing' '
        test $(git tag | wc -l) -eq 0
 '
 
+test_expect_success 'sort tags, ignore case' '
+       (
+               git init sort &&
+               cd sort &&
+               test_commit initial &&
+               git tag tag-one &&
+               git tag TAG-two &&
+               git tag -l >actual &&
+               cat >expected <<-\EOF &&
+               TAG-two
+               initial
+               tag-one
+               EOF
+               test_cmp expected actual &&
+               git tag -l -i >actual &&
+               cat >expected <<-\EOF &&
+               initial
+               tag-one
+               TAG-two
+               EOF
+               test_cmp expected actual
+       )
+'
+
 test_expect_success 'looking for a tag in an empty tree should fail' \
        '! (tag_exists mytag)'
 
@@ -81,6 +105,9 @@ test_expect_success 'listing all tags if one exists should output that tag' '
 test_expect_success 'listing a tag using a matching pattern should succeed' \
        'git tag -l mytag'
 
+test_expect_success 'listing a tag with --ignore-case' \
+       'test $(git tag -l --ignore-case MYTAG) = mytag'
+
 test_expect_success \
        'listing a tag using a matching pattern should output that tag' \
        'test $(git tag -l mytag) = mytag'