Add new @ shortcut for HEAD
[gitweb.git] / t / t1507-rev-parse-upstream.sh
index e742ce03322b6e3638147538cc0d1bc9b3a44ba2..b27a7209f7401706f3b0a37b495fc0cb3a07c29e 100755 (executable)
@@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' '
        test refs/remotes/origin/side = "$(full_name my-side@{u})"
 '
 
+test_expect_success 'refs/heads/my-side@{upstream} does not resolve to my-side{upstream}' '
+       test_must_fail full_name refs/heads/my-side@{upstream}
+'
+
 test_expect_success 'my-side@{u} resolves to correct commit' '
        git checkout side &&
        test_commit 5 &&
@@ -129,7 +133,7 @@ test_expect_success 'branch@{u} error message when no upstream' '
        fatal: Needed a single revision
        EOF
        error_message non-tracking@{u} 2>actual &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success '@{u} error message when no upstream' '
@@ -138,7 +142,7 @@ test_expect_success '@{u} error message when no upstream' '
        fatal: Needed a single revision
        EOF
        test_must_fail git rev-parse --verify @{u} 2>actual &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success 'branch@{u} error message with misspelt branch' '
@@ -147,7 +151,7 @@ test_expect_success 'branch@{u} error message with misspelt branch' '
        fatal: Needed a single revision
        EOF
        error_message no-such-branch@{u} 2>actual &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success '@{u} error message when not on a branch' '
@@ -157,7 +161,7 @@ test_expect_success '@{u} error message when not on a branch' '
        EOF
        git checkout HEAD^0 &&
        test_must_fail git rev-parse --verify @{u} 2>actual &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success 'branch@{u} error message if upstream branch not fetched' '
@@ -166,7 +170,7 @@ test_expect_success 'branch@{u} error message if upstream branch not fetched' '
        fatal: Needed a single revision
        EOF
        error_message bad-upstream@{u} 2>actual &&
-       test_cmp expect actual
+       test_i18ncmp expect actual
 '
 
 test_expect_success 'pull works when tracking a local branch' '