aboutsummaryrefslogtreecommitdiff
path: root/test-suite/tests
diff options
context:
space:
mode:
authorJohn-John Tedro <udoprog@tedro.se>2018-05-07 04:05:05 +0200
committerJohn-John Tedro <udoprog@tedro.se>2018-05-07 04:28:00 +0200
commit6c067202e061910d5018c4f96e9a7595c4291a08 (patch)
tree2716363db43f1dc466fd76864c4bda88916c7005 /test-suite/tests
parent6ff5c445f37083c785111c904426c94b7a01f4b4 (diff)
downloadmilf-rs-6c067202e061910d5018c4f96e9a7595c4291a08.tar.gz
milf-rs-6c067202e061910d5018c4f96e9a7595c4291a08.zip
Adjust spans for more complex types
Diffstat (limited to 'test-suite/tests')
-rw-r--r--test-suite/tests/spanned.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test-suite/tests/spanned.rs b/test-suite/tests/spanned.rs
index fec9ea8..c5dc28e 100644
--- a/test-suite/tests/spanned.rs
+++ b/test-suite/tests/spanned.rs
@@ -23,8 +23,21 @@ fn test_spanned_field() {
good::<String>("foo = \"foo\"", "\"foo\"");
good::<u32>("foo = 42", "42");
+ // leading plus
+ good::<u32>("foo = +42", "+42");
+ // table
good::<HashMap<String, u32>>(
"foo = {\"foo\" = 42, \"bar\" = 42}",
"{\"foo\" = 42, \"bar\" = 42}"
);
+ // array
+ good::<Vec<u32>>(
+ "foo = [0, 1, 2, 3, 4]",
+ "[0, 1, 2, 3, 4]"
+ );
+ // datetime
+ good::<String>(
+ "foo = \"1997-09-09T09:09:09Z\"",
+ "\"1997-09-09T09:09:09Z\""
+ );
}