Thread (21 messages) 21 messages, 3 authors, 2020-07-31
STALE2151d

[PATCH v1] t6300: fix issues related to %(contents:size)

From: Alban Gruin <hidden>
Date: 2020-07-31 17:45:21
Subsystem: the rest · Maintainer: Linus Torvalds

b6839fda68 (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 <redacted>
---
 t/t6300-for-each-ref.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index ea9bb6dade..bbec555977 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -65,8 +65,8 @@ test_atom() {
 			expect=$(printf '%s' "$3" | wc -c) ;;
 		esac
 		# Leave $expect unquoted to lose possible leading whitespaces
-		echo $expect >expected
-		test_expect_${4:-sucess} $PREREQ "basic atom: $1 contents:size" '
+		echo $expect >expect
+		test_expect_${4:-success} $PREREQ "basic atom: $1 contents:size" '
 			git for-each-ref --format="%(contents:size)" "$ref" >actual &&
 			test_cmp expect actual
 		'
-- 
2.20.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help