From 5459bc1bbb54536df18b034afd390f899bda37be Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Mon, 13 Dec 2021 01:30:46 -0500 Subject: t/chainlint/*.test: fix invalid test cases due to mixing quote types The chainlint self-test code snippets are supposed to represent the body of a test_expect_success() or test_expect_failure(), yet the contents of a few tests would have caused the shell to report syntax errors had they been real test bodies due to the mix of single- and double-quotes. Although chainlint.sed, with its simplistic heuristics, is blind to this problem, a future more robust chainlint implementation might not have such a limitation. Therefore, stop mixing quote types haphazardly in those tests and unify quoting throughout. While at it, drop chunks of tests which merely repeat what is already tested elsewhere but with alternative quotes. Signed-off-by: Eric Sunshine Signed-off-by: Junio C Hamano --- t/chainlint/t7900-subtree.expect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/chainlint/t7900-subtree.expect') diff --git a/t/chainlint/t7900-subtree.expect b/t/chainlint/t7900-subtree.expect index c9913429e6..f769244ef6 100644 --- a/t/chainlint/t7900-subtree.expect +++ b/t/chainlint/t7900-subtree.expect @@ -1,9 +1,9 @@ ( chks="sub1sub2sub3sub4" && - chks_sub=$(cat | sed 's,^,sub dir/,' + chks_sub=$(cat | sed "s,^,sub dir/," >>) && chkms="main-sub1main-sub2main-sub3main-sub4" && - chkms_sub=$(cat | sed 's,^,sub dir/,' + chkms_sub=$(cat | sed "s,^,sub dir/," >>) && subfiles=$(git ls-files) && check_equal "$subfiles" "$chkms$chks" -- cgit v1.2.3