view tests/test-bdiff.out @ 4131:1ca664c964e0

don't return uninitialized memory from bdiff.blocks() bdiff.blocks() returns a dummy match at the end of both files; the length of that chunk is never set, so it will sometimes contain random heap garbage. There are apparently workarounds for this elsewhere: # bdiff sometimes gives huge matches past eof, this check eats them,
author Erling Ellingsen <erlingalf@gmail.com>
date Tue, 20 Feb 2007 22:20:16 +0100
parents 8b067bde6679
children
line wrap: on
line source

*** 'a\nc\n\n\n\n' 'a\nb\n\n\n'
*** 'a\nb\nc\n' 'a\nc\n'
*** '' ''
*** 'a\nb\nc' 'a\nb\nc'
*** 'a\nb\nc\nd\n' 'a\nd\n'
*** 'a\nb\nc\nd\n' 'a\nc\ne\n'
*** 'a\nb\nc\n' 'a\nc\n'
*** 'a\n' 'c\na\nb\n'
*** 'a\n' ''
*** 'a\n' 'b\nc\n'
*** 'a\n' 'c\na\n'
*** '' 'adjfkjdjksdhfksj'
*** '' 'ab'
*** '' 'abc'
*** 'a' 'a'
*** 'ab' 'ab'
*** 'abc' 'abc'
*** 'a\n' 'a\n'
*** 'a\nb' 'a\nb'
done