Fix tests
This commit is contained in:
parent
971a19a6e0
commit
9f5cbd7d07
@ -20,17 +20,21 @@ fn ron_to_json() {
|
||||
let opt = Opt {
|
||||
input: Input::Ron,
|
||||
output: Output::Json,
|
||||
|
||||
format_in: None,
|
||||
format_out: None,
|
||||
|
||||
pretty: true,
|
||||
no_newline: false,
|
||||
};
|
||||
|
||||
let input = example_to_vec("examples/materials.ron");
|
||||
let input = example_to_vec("test-data/materials.ron");
|
||||
|
||||
let mut output = vec![];
|
||||
transcode(opt, &mut input.as_slice(), &mut output);
|
||||
let out = String::from_utf8(output).unwrap();
|
||||
|
||||
let control = example_to_string("examples/materials.json");
|
||||
let control = example_to_string("test-data/materials.json");
|
||||
|
||||
assert_eq!(control, out);
|
||||
}
|
||||
@ -40,17 +44,21 @@ fn json5_read_json() {
|
||||
let opt = Opt {
|
||||
input: Input::Json5,
|
||||
output: Output::Json,
|
||||
|
||||
format_in: None,
|
||||
format_out: None,
|
||||
|
||||
pretty: true,
|
||||
no_newline: false,
|
||||
};
|
||||
|
||||
let input = example_to_vec("examples/materials.json");
|
||||
let input = example_to_vec("test-data/materials.json");
|
||||
|
||||
let mut output = vec![];
|
||||
transcode(opt, &mut input.as_slice(), &mut output);
|
||||
let out = String::from_utf8(output).unwrap();
|
||||
|
||||
let control = example_to_string("examples/materials.json");
|
||||
let control = example_to_string("test-data/materials.json");
|
||||
|
||||
assert_eq!(control, out);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user