aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett Berg <vitiral@gmail.com>2017-07-27 22:44:58 -0600
committerGarrett Berg <vitiral@gmail.com>2017-07-28 07:14:37 -0600
commita29c1eeef04eed525d7fe48b8e06ae31c0a60575 (patch)
treeb9f1cc9e406a6c9986a76fc30a1ed3d1e9ec3c3c /tests
parent9548288de5dca4d765eba0755955108009294951 (diff)
downloadmilf-rs-a29c1eeef04eed525d7fe48b8e06ae31c0a60575.tar.gz
milf-rs-a29c1eeef04eed525d7fe48b8e06ae31c0a60575.zip
make single lines also pretty
Diffstat (limited to 'tests')
-rw-r--r--tests/pretty.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/pretty.rs b/tests/pretty.rs
index f7d1612..308772d 100644
--- a/tests/pretty.rs
+++ b/tests/pretty.rs
@@ -41,11 +41,12 @@ fn disable_pretty() {
const PRETTY_STD: &'static str = "\
[example]
array = [
- \"item 1\",
- \"item 2\",
+ 'item 1',
+ 'item 2',
]
empty = []
-oneline = \"this has no newlines.\"
+one = ['one']
+oneline = 'this has no newlines.'
text = '''
this is the first line
this is the second line
@@ -67,15 +68,21 @@ fn pretty_std() {
const PRETTY_INDENT_2: &'static str = "\
[example]
array = [
- \"item 1\",
- \"item 2\",
+ 'item 1',
+ 'item 2',
]
empty = []
-oneline = \"this has no newlines.\"
+one = ['one']
+oneline = 'this has no newlines.'
text = '''
this is the first line
this is the second line
'''
+three = [
+ 'one',
+ 'two',
+ 'three',
+]
";
#[test]
@@ -88,6 +95,7 @@ fn pretty_indent_2() {
serializer.pretty_array_indent(2);
value.serialize(&mut serializer).unwrap();
}
+ println!(">> Result:\n{}", result);
assert_eq!(toml, &result);
}
@@ -168,6 +176,7 @@ fn pretty_no_string() {
}
const PRETTY_TRICKY: &'static str = r"[example]
+single = '''this is a single line but has '' for no reason'''
text = '''
this is the first line
This has a ''\' in it for no reason