From 9d25b31974707b1248117d6d9528a8d6a5ec7bf7 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 5 Sep 2023 21:58:24 +0100 Subject: [PATCH] Another test --- .../tests/data/conditionals/NestedElseif.tid | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid diff --git a/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid b/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid new file mode 100644 index 000000000..add254161 --- /dev/null +++ b/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid @@ -0,0 +1,60 @@ +title: Conditionals/NestedElseif +description: Nested elseif conditional shortcut syntax +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Text + +\whitespace trim +This is a + {% if [match[one]] %} + {% if [match[one]] %} + Indian + {% elseif [match[two]] %} + African + {% else %} + Unknown + {% endif %} + Elephant + {% elseif [match[two]] %} + Antelope + {% else %} + Crocodile + {% endif %} +, I think. ++ +title: Output + +<$let something="one" another="one"> +{{Text}} + + +<$let something="one" another="two"> +{{Text}} + + +<$let something="one" another="three"> +{{Text}} + + +<$let something="two"> +{{Text}} + + +<$let something="three"> +{{Text}} + ++ +title: ExpectedResult + +

+This is a Indian Elephant, I think. +

+This is a African Elephant, I think. +

+This is a Unknown Elephant, I think. +

+This is a Antelope, I think. +

+This is a Crocodile, I think. +

\ No newline at end of file