From 1e1f09c7167387f63f8c91e348b7625e00b129ed Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:57:50 -0700 Subject: Look for the old and new lines in one loop --- tests/t0107-diff.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'tests/t0107-diff.sh') diff --git a/tests/t0107-diff.sh b/tests/t0107-diff.sh index a3948df..57632fa 100755 --- a/tests/t0107-diff.sh +++ b/tests/t0107-diff.sh @@ -93,22 +93,15 @@ test_expect_success 'every changed pair gets both a del and an add span' ' test_expect_success 'stripping the highlight leaves every line intact' ' sed -e "s/<[^>]*>//g" tmp >plain.out && - git -C repos/lcs show HEAD~1:lines.txt >old.txt && - git -C repos/lcs show HEAD:lines.txt >new.txt && + git -C repos/lcs show HEAD~1:lines.txt >lines && + git -C repos/lcs show HEAD:lines.txt >>lines && while read -r line do grep -qF "$line" plain.out || { - echo "missing old line: $line" + echo "missing line: $line" return 1 } - done