diff options
Diffstat (limited to 'tests/input_files')
39 files changed, 159 insertions, 0 deletions
diff --git a/tests/input_files/array_each_1 b/tests/input_files/array_each_1 new file mode 100644 index 0000000..5844d71 --- /dev/null +++ b/tests/input_files/array_each_1 @@ -0,0 +1,7 @@ +define_array(arr)DNL +define(item, <span>$0</span>)DNL +array_push(arr, test)DNL +array_push(arr, tast)DNL +array_each(arr, item) +--- +<span>test</span><span>tast</span> diff --git a/tests/input_files/array_push_1 b/tests/input_files/array_push_1 new file mode 100644 index 0000000..fb59320 --- /dev/null +++ b/tests/input_files/array_push_1 @@ -0,0 +1,5 @@ +define_array(arr)DNL +array_push(arr, test)DNL +array_size(arr) +--- +1 diff --git a/tests/input_files/array_push_2 b/tests/input_files/array_push_2 new file mode 100644 index 0000000..3b4d652 --- /dev/null +++ b/tests/input_files/array_push_2 @@ -0,0 +1,5 @@ +define_array(arr)DNL +array_push(arr, test, tast, toast)DNL +array_size(arr) +--- +3 diff --git a/tests/input_files/array_push_3 b/tests/input_files/array_push_3 new file mode 100644 index 0000000..60417b4 --- /dev/null +++ b/tests/input_files/array_push_3 @@ -0,0 +1,8 @@ +define_array(arr)DNL +array_push(arr, test, tast, toast)DNL +array_size(arr) +array_push(arr, test, tast, toast)DNL +array_size(arr) +--- +3 +6 diff --git a/tests/input_files/define_1 b/tests/input_files/define_1 new file mode 100644 index 0000000..68002ea --- /dev/null +++ b/tests/input_files/define_1 @@ -0,0 +1,5 @@ +define(TEMP, testvalue) +TEMP +--- + +testvalue diff --git a/tests/input_files/define_2 b/tests/input_files/define_2 new file mode 100644 index 0000000..016294a --- /dev/null +++ b/tests/input_files/define_2 @@ -0,0 +1,3 @@ +define(TEMP, TEMP2)define(TEMP)ifdef(TEMP2, TEMP2_ISDEF) +--- +TEMP2_ISDEF diff --git a/tests/input_files/dnl_1 b/tests/input_files/dnl_1 new file mode 100644 index 0000000..c12bc01 --- /dev/null +++ b/tests/input_files/dnl_1 @@ -0,0 +1,4 @@ +DNL +test +--- +test diff --git a/tests/input_files/dnl_2 b/tests/input_files/dnl_2 new file mode 100644 index 0000000..356aee9 --- /dev/null +++ b/tests/input_files/dnl_2 @@ -0,0 +1,4 @@ +DNL ifdef(a, b, c) +test +--- +test diff --git a/tests/input_files/dnl_3 b/tests/input_files/dnl_3 new file mode 100644 index 0000000..356aee9 --- /dev/null +++ b/tests/input_files/dnl_3 @@ -0,0 +1,4 @@ +DNL ifdef(a, b, c) +test +--- +test diff --git a/tests/input_files/dnl_4 b/tests/input_files/dnl_4 new file mode 100644 index 0000000..67c1c0e --- /dev/null +++ b/tests/input_files/dnl_4 @@ -0,0 +1,4 @@ +DNL +test +--- +test diff --git a/tests/input_files/explode_1 b/tests/input_files/explode_1 new file mode 100644 index 0000000..79b70ba --- /dev/null +++ b/tests/input_files/explode_1 @@ -0,0 +1,5 @@ +define_array(arr)DNL +explode(arr, |, a|b|c|d)DNL +array_size(arr) +--- +4 diff --git a/tests/input_files/explode_2 b/tests/input_files/explode_2 new file mode 100644 index 0000000..7ef0c08 --- /dev/null +++ b/tests/input_files/explode_2 @@ -0,0 +1,6 @@ +define_array(arr)DNL +define(item, $0)DNL +explode(arr, |, a|b|c|d)DNL +array_each(arr, item) +--- +abcd diff --git a/tests/input_files/format_time_1 b/tests/input_files/format_time_1 new file mode 100644 index 0000000..bd9a097 --- /dev/null +++ b/tests/input_files/format_time_1 @@ -0,0 +1,3 @@ +format_time(%d %B %Y, 2024-04-04T00:00:00Z) +--- +04 April 2024 diff --git a/tests/input_files/ifdef_1 b/tests/input_files/ifdef_1 new file mode 100644 index 0000000..a308141 --- /dev/null +++ b/tests/input_files/ifdef_1 @@ -0,0 +1,6 @@ +define(MAC1, test)SNNL +ifdef(MAC1, MAC1_ISDEF) +ifdef(MAC2, MAC2_ISDEF, MAC2_ISNDEF) +--- +MAC1_ISDEF +MAC2_ISNDEF diff --git a/tests/input_files/ifdef_2 b/tests/input_files/ifdef_2 new file mode 100644 index 0000000..ecef66c --- /dev/null +++ b/tests/input_files/ifdef_2 @@ -0,0 +1,3 @@ +ifdef(MAC, MAC_ISDEF) +--- + diff --git a/tests/input_files/ifdef_3 b/tests/input_files/ifdef_3 new file mode 100644 index 0000000..4867034 --- /dev/null +++ b/tests/input_files/ifdef_3 @@ -0,0 +1,3 @@ +ifdef(MAC, MAC_ISDEF, MAC_ISNDEF) +--- +MAC_ISNDEF diff --git a/tests/input_files/ifeq_1 b/tests/input_files/ifeq_1 new file mode 100644 index 0000000..3e49f68 --- /dev/null +++ b/tests/input_files/ifeq_1 @@ -0,0 +1,3 @@ +ifeq(a, a, true, false) +--- +true diff --git a/tests/input_files/ifeq_2 b/tests/input_files/ifeq_2 new file mode 100644 index 0000000..fe7c0ac --- /dev/null +++ b/tests/input_files/ifeq_2 @@ -0,0 +1,3 @@ +ifeq(a, b, true, false) +--- +false diff --git a/tests/input_files/ifeq_3 b/tests/input_files/ifeq_3 new file mode 100644 index 0000000..42646b8 --- /dev/null +++ b/tests/input_files/ifeq_3 @@ -0,0 +1,3 @@ +ifeq(a, a, true) +--- +true diff --git a/tests/input_files/ifeq_4 b/tests/input_files/ifeq_4 new file mode 100644 index 0000000..d069530 --- /dev/null +++ b/tests/input_files/ifeq_4 @@ -0,0 +1,3 @@ +ifeq(a, b, true) +--- + diff --git a/tests/input_files/ifndef_1 b/tests/input_files/ifndef_1 new file mode 100644 index 0000000..857204b --- /dev/null +++ b/tests/input_files/ifndef_1 @@ -0,0 +1,3 @@ +ifndef(MAC, MAC_ISNDEF) +--- +MAC_ISNDEF diff --git a/tests/input_files/ifndef_2 b/tests/input_files/ifndef_2 new file mode 100644 index 0000000..fbe0ba3 --- /dev/null +++ b/tests/input_files/ifndef_2 @@ -0,0 +1,4 @@ +define(MAC, test)SNNL +ifndef(MAC, MAC_ISNDEF, MAC_ISDEF) +--- +MAC_ISDEF diff --git a/tests/input_files/ifndef_3 b/tests/input_files/ifndef_3 new file mode 100644 index 0000000..82a180d --- /dev/null +++ b/tests/input_files/ifndef_3 @@ -0,0 +1,4 @@ +define(MAC, test)SNNL +ifndef(MAC, MAC_ISNDEF) +--- + diff --git a/tests/input_files/ifneq_1 b/tests/input_files/ifneq_1 new file mode 100644 index 0000000..5b443c5 --- /dev/null +++ b/tests/input_files/ifneq_1 @@ -0,0 +1,3 @@ +ifneq(a, a, true, false) +--- +false diff --git a/tests/input_files/ifneq_2 b/tests/input_files/ifneq_2 new file mode 100644 index 0000000..8145e9f --- /dev/null +++ b/tests/input_files/ifneq_2 @@ -0,0 +1,3 @@ +ifneq(a, b, true, false) +--- +true diff --git a/tests/input_files/ifneq_3 b/tests/input_files/ifneq_3 new file mode 100644 index 0000000..163d871 --- /dev/null +++ b/tests/input_files/ifneq_3 @@ -0,0 +1,3 @@ +ifneq(a, a, true) +--- + diff --git a/tests/input_files/ifneq_4 b/tests/input_files/ifneq_4 new file mode 100644 index 0000000..c93a572 --- /dev/null +++ b/tests/input_files/ifneq_4 @@ -0,0 +1,3 @@ +ifneq(a, b, true) +--- +true diff --git a/tests/input_files/include_1 b/tests/input_files/include_1 new file mode 100644 index 0000000..1621de2 --- /dev/null +++ b/tests/input_files/include_1 @@ -0,0 +1,3 @@ +include(tests/example_include.smp) +--- + diff --git a/tests/input_files/include_2 b/tests/input_files/include_2 new file mode 100644 index 0000000..2714eff --- /dev/null +++ b/tests/input_files/include_2 @@ -0,0 +1,4 @@ +include(tests/example_include.smp)SNNL +ifdef(SMP, SMP_ISDEF, SMP_ISNDEF) +--- +SMP_ISDEF diff --git a/tests/input_files/markdown_html_1 b/tests/input_files/markdown_html_1 new file mode 100644 index 0000000..6a9f143 --- /dev/null +++ b/tests/input_files/markdown_html_1 @@ -0,0 +1,5 @@ +html_from_markdown(%" +# Test +"%) +--- +<h1>Test</h1> diff --git a/tests/input_files/markdown_html_2 b/tests/input_files/markdown_html_2 new file mode 100644 index 0000000..6a9f143 --- /dev/null +++ b/tests/input_files/markdown_html_2 @@ -0,0 +1,5 @@ +html_from_markdown(%" +# Test +"%) +--- +<h1>Test</h1> diff --git a/tests/input_files/non_macro_html b/tests/input_files/non_macro_html new file mode 100644 index 0000000..6f49b4a --- /dev/null +++ b/tests/input_files/non_macro_html @@ -0,0 +1,7 @@ +<html> + <p>This is a <em>test</em></p> +</html> +--- +<html> + <p>This is a <em>test</em></p> +</html> diff --git a/tests/input_files/shell_1 b/tests/input_files/shell_1 new file mode 100644 index 0000000..3eb1f14 --- /dev/null +++ b/tests/input_files/shell_1 @@ -0,0 +1,3 @@ +shell(printf test) +--- +test diff --git a/tests/input_files/snnl_1 b/tests/input_files/snnl_1 new file mode 100644 index 0000000..47a10b9 --- /dev/null +++ b/tests/input_files/snnl_1 @@ -0,0 +1,4 @@ +SNNL +test +--- +test diff --git a/tests/input_files/snnl_2 b/tests/input_files/snnl_2 new file mode 100644 index 0000000..2fcd0ba --- /dev/null +++ b/tests/input_files/snnl_2 @@ -0,0 +1,4 @@ +SNNL +test +--- +test diff --git a/tests/input_files/snnl_3 b/tests/input_files/snnl_3 new file mode 100644 index 0000000..4a7dad7 --- /dev/null +++ b/tests/input_files/snnl_3 @@ -0,0 +1,5 @@ +define(MAC1, test)SNNL +MAC1 SNNL +test +--- +test test diff --git a/tests/input_files/special_macros_1 b/tests/input_files/special_macros_1 new file mode 100644 index 0000000..eba505b --- /dev/null +++ b/tests/input_files/special_macros_1 @@ -0,0 +1,3 @@ +@test +--- +@test diff --git a/tests/input_files/whitespace_deleting_1 b/tests/input_files/whitespace_deleting_1 new file mode 100644 index 0000000..ccda45f --- /dev/null +++ b/tests/input_files/whitespace_deleting_1 @@ -0,0 +1,3 @@ +define(a, b) a +--- + b diff --git a/tests/input_files/whitespace_deleting_2 b/tests/input_files/whitespace_deleting_2 new file mode 100644 index 0000000..8777c39 --- /dev/null +++ b/tests/input_files/whitespace_deleting_2 @@ -0,0 +1,3 @@ +define(a, b) a_ +--- +b |