Update test for commit 6d07c43

This commit is contained in:
Kogia-sima 2020-06-07 01:28:17 +09:00
parent 6d07c43876
commit d3ee38c6f2
3 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,5 @@
1
2
INCLUDED: foo
3
4

View File

@ -1,7 +1,5 @@
INCLUDED: foo
INCLUDED: bar

View File

@ -12,7 +12,13 @@ fn assert_render_result(name: &str, result: RenderResult) {
output_file.push(name);
output_file.set_extension("out");
let expected = std::fs::read_to_string(output_file).unwrap();
let mut expected = std::fs::read_to_string(output_file).unwrap();
if expected.ends_with('\n') {
expected.truncate(expected.len() - 1);
if expected.ends_with('\r') {
expected.truncate(expected.len() - 1);
}
}
assert_string_eq!(&*result.unwrap(), &*expected);
}