Skip to content

Commit 1ce5fce

Browse files
committed
Print out size of diff files upon a DIFF unit test passing.
1 parent f80a520 commit 1ce5fce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/DIFF/test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ test_case() {
88
mkdir -p result
99
cp "case$1"/* result
1010
cd "result"
11-
$INTERP $SCRIPT a.txt b.txt > "diff"
12-
patch -s --posix --batch -p0 < "diff"
11+
diff -u a.txt b.txt > "diff-gnu"
12+
$INTERP $SCRIPT a.txt b.txt > "diff-lua"
13+
patch -s --posix --batch -p0 < "diff-lua"
1314
if { set +e; cmp -s a.txt b.txt; }; then
1415
printf "\tCASE %s: PASS\n" "$1"
16+
printf "\t\tSIZE:\n\t\t\tGNU: %'6d\n\t\t\tLUA: %'6d\n"\
17+
"$(stat -L -c%s diff-gnu)"\
18+
"$(stat -L -c%s diff-lua)"
1519
else
1620
printf "\tCASE %s: FAIL\n" "$1"
1721
FAIL=$((FAIL + 1))

0 commit comments

Comments
 (0)