From 56300ff356bfa595c7d407323db1fb4cf279e2a7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 23 Oct 2020 14:00:03 +0000 Subject: t3200: prepare for `main` being shorter than `master` In the test case adjusted by this patch, we want to cut just after the longest shown ref name. Since `main` is shorter than `master`, we need to decrease the number of characters. Since `topic` is shown, too, and since that is only one character shorter than `master`, we decrement the length by one instead of two. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3200-branch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t3200-branch.sh') diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 6efe7a44bc..55b24b76ce 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -375,9 +375,9 @@ test_expect_success 'git branch --column -v should fail' ' test_must_fail git branch --column -v ' -test_expect_success 'git branch -v with column.ui ignored' ' +test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch -v with column.ui ignored' ' git config column.ui column && - COLUMNS=80 git branch -v | cut -c -9 | sed "s/ *$//" >actual && + COLUMNS=80 git branch -v | cut -c -8 | sed "s/ *$//" >actual && git config --unset column.ui && cat >expect <<\EOF && a/b/c -- cgit v1.2.3 From 66713e84e713066f4984efdd1444a7567c4d9bde Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 23 Oct 2020 14:00:05 +0000 Subject: tests: prepare aligned mentions of the default branch name In some tests, the default branch name is part of aligned output. As we want to change the default branch name to `main`, which is two characters shorter than the old default branch name, we will have to adjust those tests. Since we use the original default branch name until the entire test suite has been adjusted accordingly, the touched test cases need to be guarded by a prereq (that is so far disabled so that they are skipped for now). The test cases that depend on those test cases that are newly guarded by that prereq naturally have to be guarded, too. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3200-branch.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 't/t3200-branch.sh') diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 55b24b76ce..a0b832d59e 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -321,11 +321,11 @@ test_expect_success 'git branch --list -v with --abbrev' ' ' -test_expect_success 'git branch --column' ' +test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch --column' ' COLUMNS=81 git branch --column=column >actual && cat >expect <<\EOF && - a/b/c bam foo l * master n o/p r - abc bar j/k m/m mb o/o q topic + a/b/c bam foo l * main n o/p r + abc bar j/k m/m mb o/o q topic EOF test_cmp expect actual ' @@ -358,15 +358,15 @@ EOF test_cmp expect actual ' -test_expect_success 'git branch with column.*' ' +test_expect_success PREPARE_FOR_MAIN_BRANCH 'git branch with column.*' ' git config column.ui column && git config column.branch "dense" && COLUMNS=80 git branch >actual && git config --unset column.branch && git config --unset column.ui && cat >expect <<\EOF && - a/b/c bam foo l * master n o/p r - abc bar j/k m/m mb o/o q topic + a/b/c bam foo l * main n o/p r + abc bar j/k m/m mb o/o q topic EOF test_cmp expect actual ' -- cgit v1.2.3