Use macro per-test-file
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
605798674f
commit
06816567ff
49 changed files with 213 additions and 271 deletions
41
tests/cases/if_else_if.1-parsed.snap
Normal file
41
tests/cases/if_else_if.1-parsed.snap
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: parsed
|
||||
info:
|
||||
input: "{{ if test }}\n Not Hello World! :C\n{{ else if another_test }}\n Hello World!\n{{ end }}"
|
||||
context:
|
||||
test: false
|
||||
stuff: more
|
||||
another_test: true
|
||||
---
|
||||
ParsedTemplate {
|
||||
tokens: [
|
||||
[LeftDelim]"{{" (0..2),
|
||||
[Whitespace]" " (2..3),
|
||||
[ConditionalIf]"if" (3..5),
|
||||
[Whitespace]" " (5..6),
|
||||
[Ident]"test" (6..10),
|
||||
[Whitespace]" " (10..11),
|
||||
[RightDelim]"}}" (11..13),
|
||||
[Whitespace]"\n " (13..18),
|
||||
[Content]"Not Hello World! :C" (18..37),
|
||||
[Whitespace]"\n" (37..38),
|
||||
[LeftDelim]"{{" (38..40),
|
||||
[Whitespace]" " (40..41),
|
||||
[ConditionalElse]"else" (41..45),
|
||||
[Whitespace]" " (45..46),
|
||||
[ConditionalIf]"if" (46..48),
|
||||
[Whitespace]" " (48..49),
|
||||
[Ident]"another_test" (49..61),
|
||||
[Whitespace]" " (61..62),
|
||||
[RightDelim]"}}" (62..64),
|
||||
[Whitespace]"\n " (64..69),
|
||||
[Content]"Hello World!" (69..81),
|
||||
[Whitespace]"\n" (81..82),
|
||||
[LeftDelim]"{{" (82..84),
|
||||
[Whitespace]" " (84..85),
|
||||
[End]"end" (85..88),
|
||||
[Whitespace]" " (88..89),
|
||||
[RightDelim]"}}" (89..91),
|
||||
],
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue