From 8f379c425d36d188c2cfb5e24782d71df6c2a56c Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sat, 15 Feb 2020 09:45:43 -0500 Subject: [PATCH] Add tests for `str-length()` --- tests/strings.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/strings.rs b/tests/strings.rs index 6be6930..15f1a84 100644 --- a/tests/strings.rs +++ b/tests/strings.rs @@ -83,3 +83,21 @@ test!( "a {\n color: str-slice(\"cde\", 1, 0);\n}\n", "a {\n color: \"\";\n}\n" ); +test!( + str_len_dbl_quotes, + "a {\n color: str-length(\"cde\");\n}\n", + "a {\n color: 3;\n}\n" +); +test!( + str_len_unquoted, + "a {\n color: str-length(cde);\n}\n", + "a {\n color: 3;\n}\n" +); +// blocked on refactoring how function-call args are parsed +// right now, whitespace is eaten between idents with no +// regard for quotes +// test!( +// str_len_space, +// "a {\n color: str-length(\"foo bar\");\n}\n", +// "a {\n color: 7;\n}\n" +// );