summaryrefslogtreecommitdiff
path: root/t/t6040-tracking-info.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6040-tracking-info.sh')
-rwxr-xr-xt/t6040-tracking-info.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
index 8f17fd9..716283b 100755
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
@@ -147,6 +147,48 @@ test_expect_success 'status -s -b (diverged from upstream)' '
'
cat >expect <<\EOF
+## b1...origin/master [different]
+EOF
+
+test_expect_success 'status -s -b --no-ahead-behind (diverged from upstream)' '
+ (
+ cd test &&
+ git checkout b1 >/dev/null &&
+ git status -s -b --no-ahead-behind | head -1
+ ) >actual &&
+ test_i18ncmp expect actual
+'
+
+cat >expect <<\EOF
+On branch b1
+Your branch and 'origin/master' have diverged,
+and have 1 and 1 different commits each, respectively.
+EOF
+
+test_expect_success 'status --long --branch' '
+ (
+ cd test &&
+ git checkout b1 >/dev/null &&
+ git status --long -b | head -3
+ ) >actual &&
+ test_i18ncmp expect actual
+'
+
+cat >expect <<\EOF
+On branch b1
+Your branch and 'origin/master' refer to different commits.
+EOF
+
+test_expect_success 'status --long --branch --no-ahead-behind' '
+ (
+ cd test &&
+ git checkout b1 >/dev/null &&
+ git status --long -b --no-ahead-behind | head -2
+ ) >actual &&
+ test_i18ncmp expect actual
+'
+
+cat >expect <<\EOF
## b5...brokenbase [gone]
EOF