Skip to content

Commit 822ab3a

Browse files
javier-godoypaodb
authored andcommitted
test: add test for unknown variable
1 parent 816e7ba commit 822ab3a

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ public void testConditionElif() {
5151
public void testConditionNested() {
5252
assertEquals(expected(), open(VAADIN_VERSION));
5353
}
54+
55+
@Test
56+
public void testConditionUnknownVariable() {
57+
assertEquals(expected(), open(VAADIN_VERSION));
58+
}
5459
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class MyClass {
2+
// show-source begin
3+
// #if unknown eq 42
4+
// show-source eq
5+
// #endif
6+
// #if unknown ne 42
7+
// show-source ne
8+
// #endif
9+
// show-source end
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class MyClass {
2+
begin
3+
end
4+
}

0 commit comments

Comments
 (0)