diff options
Diffstat (limited to 'third_party/rust/ron/tests/240_array_pretty.rs')
-rw-r--r-- | third_party/rust/ron/tests/240_array_pretty.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/third_party/rust/ron/tests/240_array_pretty.rs b/third_party/rust/ron/tests/240_array_pretty.rs new file mode 100644 index 0000000000..957be1572c --- /dev/null +++ b/third_party/rust/ron/tests/240_array_pretty.rs @@ -0,0 +1,14 @@ +use ron::ser::{to_string_pretty, PrettyConfig}; + +#[test] +fn small_array() { + let arr = &[(), (), ()][..]; + assert_eq!( + to_string_pretty(&arr, PrettyConfig::new().with_new_line("\n".to_string())).unwrap(), + "[ + (), + (), + (), +]" + ); +} |