Skip to content

Commit 816e7ba

Browse files
javier-godoypaodb
authored andcommitted
test: add test for nested directives
1 parent 2ef0794 commit 816e7ba

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/test/java/com/flowingcode/vaadin/addons/demo/it/ConditionalSourceCodeViewerIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,8 @@ public void testConditionElif() {
4747
assertEquals(expected(), open(VAADIN_VERSION));
4848
}
4949

50+
@Test
51+
public void testConditionNested() {
52+
assertEquals(expected(), open(VAADIN_VERSION));
53+
}
5054
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class MyClass {
2+
// #if vaadin eq 23
3+
// show-source 23
4+
// #if vaadin eq 23.4
5+
// show-source 23, 23.4
6+
// #endif
7+
// show-source 23
8+
// #endif
9+
10+
// #if vaadin eq 22
11+
// show-source 22
12+
// #if vaadin eq 23.4
13+
// show-source 22, 23.4
14+
// #endif
15+
// show-source 22
16+
// #endif
17+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class MyClass {
2+
23
3+
23, 23.4
4+
23
5+
6+
}

0 commit comments

Comments
 (0)