summaryrefslogtreecommitdiff
path: root/src/syntax/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/mod.rs')
-rw-r--r--src/syntax/mod.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs
index 409e8cbf..2a8c4dbb 100644
--- a/src/syntax/mod.rs
+++ b/src/syntax/mod.rs
@@ -64,9 +64,18 @@ mod tests {
// Raw.
roundtrip("``");
- roundtrip("`lang 1`");
- test("``` hi```", "`hi`");
- test("``` ` ```", "```");
+ roundtrip("`nolang 1`");
+ roundtrip("```lang 1```");
+ roundtrip("```lang 1 ```");
+ roundtrip("```hi line ```");
+ roundtrip("```py\ndef\n```");
+ roundtrip("```\n line \n```");
+ roundtrip("```\n`\n```");
+ roundtrip("``` ` ```");
+ test("```1 ```", "``");
+ test("``` 1```", "`1`");
+ test("``` 1 ```", "`1 `");
+ test("```` ` ````", "``` ` ```");
}
#[test]
@@ -77,12 +86,12 @@ mod tests {
roundtrip("{true}");
roundtrip("{10}");
roundtrip("{3.14}");
- roundtrip("{10pt}");
+ roundtrip("{10.0pt}");
roundtrip("{14.1deg}");
- roundtrip("{20%}");
+ roundtrip("{20.0%}");
roundtrip("{#abcdef}");
roundtrip(r#"{"hi"}"#);
- test(r#"{"let's go"}"#, r#"{"let\'s go"}"#);
+ test(r#"{"let's \" go"}"#, r#"{"let's \" go"}"#);
// Arrays.
roundtrip("{()}");