test/case_finder.rb in avro-1.9.2 vs test/case_finder.rb in avro-1.10.0
- old
+ new
@@ -42,27 +42,32 @@
end
private
def scan_case
- if id = @scanner.scan(/\/\/ \d+\n/)
+ if (id = @scanner.scan(/\/\/ \d+\n/))
while @scanner.skip(/\/\/ .*\n/); end
input = scan_input
canonical = scan_canonical
fingerprint = scan_fingerprint
-
+ if not fingerprint and @cases
+ fingerprint = @cases[-1].fingerprint
+ end
+ if fingerprint
+ fingerprint = fingerprint.to_i & 0xFFFF_FFFF_FFFF_FFFF
+ end
Case.new(id, input, canonical, fingerprint)
else
@scanner.skip(/.*\n/)
nil
end
end
def scan_item(name)
if @scanner.scan(/<<#{name}\n/)
lines = []
- while line = @scanner.scan(/.+\n/)
+ while (line = @scanner.scan(/.+\n/))
break if line.chomp == name
lines << line
end
lines.join
elsif @scanner.scan(/<<#{name} /)