def helper_test_thirteen (body_fmt, file_name)
one = "FIVE SIX"
val1 = one.clone
two = "ONE TWO"
val2 = two.clone
val3 = "Yay"
var_exp = 3.44e10
File.open(file_name,
File::CREAT | File::WRONLY | File::TRUNC) { |file|
body_fmt.io = file
body_fmt.printFormat(binding)
}
output = []
File.open( file_name ){ |file|
output = file.readlines()
}
reader = FormatReader.new(body_fmt)
res = reader.readFormat(output)
assert(res['val1'] == one)
assert(res['val2'] == two)
assert(res['val3'] == val3)
assert(res['var_exp'] == var_exp)
puts "tested 13 in #{file_name}"
File.delete(file_name) unless (@@keep)
end