i18n: connect: mark die messages for translation
[gitweb.git] / t / t5512-ls-remote.sh
index aadaac515e086a7f87c6d06a0313fe7b77d11f92..c23434ba297ed7b05d329186590bb840887eb1c1 100755 (executable)
@@ -99,7 +99,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
        # We could just as easily have used "master"; the "*" emphasizes its
        # role as a pattern.
        test_must_fail git ls-remote refs*master >actual 2>&1 &&
-       test_cmp exp actual
+       test_i18ncmp exp actual
 '
 
 test_expect_success 'die with non-2 for wrong repository even with --exit-code' '
@@ -163,4 +163,49 @@ test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs'
        grep refs/tags/magic actual
 '
 
+test_expect_success 'ls-remote --symref' '
+       cat >expect <<-\EOF &&
+       ref: refs/heads/master  HEAD
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        HEAD
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/heads/master
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/remotes/origin/HEAD
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/remotes/origin/master
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/tags/mark
+       EOF
+       git ls-remote --symref >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'ls-remote with filtered symref (refname)' '
+       cat >expect <<-\EOF &&
+       ref: refs/heads/master  HEAD
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        HEAD
+       EOF
+       git ls-remote --symref . HEAD >actual &&
+       test_cmp expect actual
+'
+
+test_expect_failure 'ls-remote with filtered symref (--heads)' '
+       git symbolic-ref refs/heads/foo refs/tags/mark &&
+       cat >expect <<-\EOF &&
+       ref: refs/tags/mark     refs/heads/foo
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/heads/foo
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/heads/master
+       EOF
+       git ls-remote --symref --heads . >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'ls-remote --symref omits filtered-out matches' '
+       cat >expect <<-\EOF &&
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/heads/foo
+       1bd44cb9d13204b0fe1958db0082f5028a16eb3a        refs/heads/master
+       EOF
+       git ls-remote --symref --heads . >actual &&
+       test_cmp expect actual &&
+       git ls-remote --symref . "refs/heads/*" >actual &&
+       test_cmp expect actual
+'
+
+
 test_done