@for tests
This commit is contained in:
parent
1b79127cc5
commit
659dfba1b2
25
tests/for.rs
Normal file
25
tests/for.rs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#![cfg(test)]
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
mod macros;
|
||||||
|
|
||||||
|
test!(
|
||||||
|
for_1_through_3,
|
||||||
|
"@for $i from 1 through 3 {\n a {\n color: $i;\n }\n}\n",
|
||||||
|
"a {\n color: 1;\n}\n\na {\n color: 2;\n}\n\na {\n color: 3;\n}\n"
|
||||||
|
);
|
||||||
|
test!(
|
||||||
|
for_1_to_3,
|
||||||
|
"@for $i from 1 to 3 {\n a {\n color: $i;\n }\n}\n",
|
||||||
|
"a {\n color: 1;\n}\n\na {\n color: 2;\n}\n"
|
||||||
|
);
|
||||||
|
test!(
|
||||||
|
for_3_through_1,
|
||||||
|
"@for $i from 3 through 1 {\n a {\n color: $i;\n }\n}\n",
|
||||||
|
"a {\n color: 3;\n}\n\na {\n color: 2;\n}\n\na {\n color: 1;\n}\n"
|
||||||
|
);
|
||||||
|
test!(
|
||||||
|
for_3_to_1,
|
||||||
|
"@for $i from 3 to 1 {\n a {\n color: $i;\n }\n}\n",
|
||||||
|
"a {\n color: 3;\n}\n\na {\n color: 2;\n}\n"
|
||||||
|
);
|
Loading…
x
Reference in New Issue
Block a user