Skip to content

Commit 3db796c

Browse files
agrngitster
authored andcommitted
t6300: fix issues related to %(contents:size)
b6839fd (ref-filter: add support for %(contents:size), 2020-07-16) added a new format for ref-filter, and added a function to generate tests for this new feature in t6300. Unfortunately, it tries to run `test_expect_sucess' instead of `test_expect_success', and writes $expect to `expected', but tries to read `expect'. Those two issues were probably unnoticed because the script only printed errors, but did not crash. This fixes these issues. Signed-off-by: Alban Gruin <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6839fd commit 3db796c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t6300-for-each-ref.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ test_atom() {
6666
esac
6767
# Leave $expect unquoted to lose possible leading whitespaces
6868
echo $expect >expected
69-
test_expect_${4:-sucess} $PREREQ "basic atom: $1 contents:size" '
69+
test_expect_${4:-success} $PREREQ "basic atom: $1 contents:size" '
7070
git for-each-ref --format="%(contents:size)" "$ref" >actual &&
71-
test_cmp expect actual
71+
test_cmp expected actual
7272
'
7373
fi
7474
}

0 commit comments

Comments
 (0)