grass/tests/strings.rs
2020-02-09 03:13:31 -05:00

36 lines
736 B
Rust

#![cfg(test)]
#[macro_use]
mod macros;
test!(
uppercase_ident,
"a {\n color: to-upper-case(aBc123);\n}\n",
"a {\n color: ABC123;\n}\n"
);
test!(
lowercase_ident,
"a {\n color: to-lower-case(AbC123);\n}\n",
"a {\n color: abc123;\n}\n"
);
test!(
uppercase_named_arg,
"a {\n color: to-upper-case($string: aBc123);\n}\n",
"a {\n color: ABC123;\n}\n"
);
test!(
lowercase_named_arg,
"a {\n color: to-lower-case($string: AbC123);\n}\n",
"a {\n color: abc123;\n}\n"
);
test!(
length_ident,
"a {\n color: str-length(AbC123);\n}\n",
"a {\n color: 6;\n}\n"
);
test!(
length_named_arg,
"a {\n color: str-length($string: aBc123);\n}\n",
"a {\n color: 6;\n}\n"
);