From 2e3cd8b779e2ab9184b4e597f25c0164a4286eca Mon Sep 17 00:00:00 2001 From: Torben Ewert Date: Fri, 15 Mar 2024 12:58:41 +0100 Subject: [PATCH] update tests so they can be run on its own --- test/{array.t => array}/data.pi | 0 test/array/dune | 4 ++ test/{array.t => array}/run.t | 0 test/{char.t => char}/data.pi | 0 test/char/dune | 4 ++ test/{char.t => char}/run.t | 0 .../Sub/SubComponent.pi | 0 test/{component.t => component}/data.pi | 0 test/component/dune | 4 ++ test/{component.t => component}/run.t | 0 .../HeadlineSecondary.pi | 0 test/{context.t => context}/SubComponent.pi | 0 test/{context.t => context}/data.pi | 0 test/context/dune | 4 ++ test/{context.t => context}/run.t | 0 test/dune | 2 - test/{function.t => function}/data.pi | 0 test/function/dune | 4 ++ test/{function.t => function}/library.pi | 0 test/{function.t => function}/run.t | 0 .../data.pi | 0 test/interpreter_error/dune | 4 ++ .../run.t | 0 test/{loop.t => loop}/data.pi | 0 test/loop/dune | 4 ++ test/{loop.t => loop}/run.t | 0 test/{mutation.t => mutation}/data.pi | 0 test/mutation/dune | 4 ++ test/{mutation.t => mutation}/run.t | 0 test/{operators.t => operators}/data.pi | 0 test/operators/dune | 4 ++ test/{operators.t => operators}/run.t | 0 test/parse_error/dune | 4 ++ .../empty_template_expression.pi | 0 .../let_without_expression.pi | 0 .../mutation_without_expression.pi | 0 test/{parse_error.t => parse_error}/run.t | 0 .../string_interpolation.pi | 0 .../tag_transformer_function.pi | 0 test/portal/dune | 4 ++ test/{portal.t => portal}/main.pi | 0 test/{portal.t => portal}/run.t | 0 test/{record.t => record}/data.pi | 0 test/record/dune | 4 ++ test/{record.t => record}/run.t | 0 test/{slot.t => slot}/SlotProvider.pi | 0 test/{slot.t => slot}/SubComponent.pi | 0 test/{slot.t => slot}/data.pi | 0 test/slot/dune | 4 ++ test/{slot.t => slot}/run.t | 0 test/{store.t => store}/StoreValueProvider.pi | 0 test/store/dune | 4 ++ test/{store.t => store}/run.t | 0 test/{store.t => store}/stores.pi | 0 test/template.t/data.pi | 28 ------------ test/template.t/run.t | 12 ----- test/template/data.pi | 45 +++++++++++++++++++ test/template/dune | 4 ++ test/template/run.t | 27 +++++++++++ test/{test.t => test}/data.pi | 0 test/test/dune | 4 ++ test/{test.t => test}/run.t | 0 62 files changed, 136 insertions(+), 42 deletions(-) rename test/{array.t => array}/data.pi (100%) create mode 100644 test/array/dune rename test/{array.t => array}/run.t (100%) rename test/{char.t => char}/data.pi (100%) create mode 100644 test/char/dune rename test/{char.t => char}/run.t (100%) rename test/{component.t => component}/Sub/SubComponent.pi (100%) rename test/{component.t => component}/data.pi (100%) create mode 100644 test/component/dune rename test/{component.t => component}/run.t (100%) rename test/{context.t => context}/HeadlineSecondary.pi (100%) rename test/{context.t => context}/SubComponent.pi (100%) rename test/{context.t => context}/data.pi (100%) create mode 100644 test/context/dune rename test/{context.t => context}/run.t (100%) delete mode 100644 test/dune rename test/{function.t => function}/data.pi (100%) create mode 100644 test/function/dune rename test/{function.t => function}/library.pi (100%) rename test/{function.t => function}/run.t (100%) rename test/{interpreter_error.t => interpreter_error}/data.pi (100%) create mode 100644 test/interpreter_error/dune rename test/{interpreter_error.t => interpreter_error}/run.t (100%) rename test/{loop.t => loop}/data.pi (100%) create mode 100644 test/loop/dune rename test/{loop.t => loop}/run.t (100%) rename test/{mutation.t => mutation}/data.pi (100%) create mode 100644 test/mutation/dune rename test/{mutation.t => mutation}/run.t (100%) rename test/{operators.t => operators}/data.pi (100%) create mode 100644 test/operators/dune rename test/{operators.t => operators}/run.t (100%) create mode 100644 test/parse_error/dune rename test/{parse_error.t => parse_error}/empty_template_expression.pi (100%) rename test/{parse_error.t => parse_error}/let_without_expression.pi (100%) rename test/{parse_error.t => parse_error}/mutation_without_expression.pi (100%) rename test/{parse_error.t => parse_error}/run.t (100%) rename test/{parse_error.t => parse_error}/string_interpolation.pi (100%) rename test/{parse_error.t => parse_error}/tag_transformer_function.pi (100%) create mode 100644 test/portal/dune rename test/{portal.t => portal}/main.pi (100%) rename test/{portal.t => portal}/run.t (100%) rename test/{record.t => record}/data.pi (100%) create mode 100644 test/record/dune rename test/{record.t => record}/run.t (100%) rename test/{slot.t => slot}/SlotProvider.pi (100%) rename test/{slot.t => slot}/SubComponent.pi (100%) rename test/{slot.t => slot}/data.pi (100%) create mode 100644 test/slot/dune rename test/{slot.t => slot}/run.t (100%) rename test/{store.t => store}/StoreValueProvider.pi (100%) create mode 100644 test/store/dune rename test/{store.t => store}/run.t (100%) rename test/{store.t => store}/stores.pi (100%) delete mode 100644 test/template.t/data.pi delete mode 100644 test/template.t/run.t create mode 100644 test/template/data.pi create mode 100644 test/template/dune create mode 100644 test/template/run.t rename test/{test.t => test}/data.pi (100%) create mode 100644 test/test/dune rename test/{test.t => test}/run.t (100%) diff --git a/test/array.t/data.pi b/test/array/data.pi similarity index 100% rename from test/array.t/data.pi rename to test/array/data.pi diff --git a/test/array/dune b/test/array/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/array/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/array.t/run.t b/test/array/run.t similarity index 100% rename from test/array.t/run.t rename to test/array/run.t diff --git a/test/char.t/data.pi b/test/char/data.pi similarity index 100% rename from test/char.t/data.pi rename to test/char/data.pi diff --git a/test/char/dune b/test/char/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/char/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/char.t/run.t b/test/char/run.t similarity index 100% rename from test/char.t/run.t rename to test/char/run.t diff --git a/test/component.t/Sub/SubComponent.pi b/test/component/Sub/SubComponent.pi similarity index 100% rename from test/component.t/Sub/SubComponent.pi rename to test/component/Sub/SubComponent.pi diff --git a/test/component.t/data.pi b/test/component/data.pi similarity index 100% rename from test/component.t/data.pi rename to test/component/data.pi diff --git a/test/component/dune b/test/component/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/component/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/component.t/run.t b/test/component/run.t similarity index 100% rename from test/component.t/run.t rename to test/component/run.t diff --git a/test/context.t/HeadlineSecondary.pi b/test/context/HeadlineSecondary.pi similarity index 100% rename from test/context.t/HeadlineSecondary.pi rename to test/context/HeadlineSecondary.pi diff --git a/test/context.t/SubComponent.pi b/test/context/SubComponent.pi similarity index 100% rename from test/context.t/SubComponent.pi rename to test/context/SubComponent.pi diff --git a/test/context.t/data.pi b/test/context/data.pi similarity index 100% rename from test/context.t/data.pi rename to test/context/data.pi diff --git a/test/context/dune b/test/context/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/context/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/context.t/run.t b/test/context/run.t similarity index 100% rename from test/context.t/run.t rename to test/context/run.t diff --git a/test/dune b/test/dune deleted file mode 100644 index 85e846c..0000000 --- a/test/dune +++ /dev/null @@ -1,2 +0,0 @@ -(cram - (deps %{bin:print})) diff --git a/test/function.t/data.pi b/test/function/data.pi similarity index 100% rename from test/function.t/data.pi rename to test/function/data.pi diff --git a/test/function/dune b/test/function/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/function/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/function.t/library.pi b/test/function/library.pi similarity index 100% rename from test/function.t/library.pi rename to test/function/library.pi diff --git a/test/function.t/run.t b/test/function/run.t similarity index 100% rename from test/function.t/run.t rename to test/function/run.t diff --git a/test/interpreter_error.t/data.pi b/test/interpreter_error/data.pi similarity index 100% rename from test/interpreter_error.t/data.pi rename to test/interpreter_error/data.pi diff --git a/test/interpreter_error/dune b/test/interpreter_error/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/interpreter_error/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/interpreter_error.t/run.t b/test/interpreter_error/run.t similarity index 100% rename from test/interpreter_error.t/run.t rename to test/interpreter_error/run.t diff --git a/test/loop.t/data.pi b/test/loop/data.pi similarity index 100% rename from test/loop.t/data.pi rename to test/loop/data.pi diff --git a/test/loop/dune b/test/loop/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/loop/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/loop.t/run.t b/test/loop/run.t similarity index 100% rename from test/loop.t/run.t rename to test/loop/run.t diff --git a/test/mutation.t/data.pi b/test/mutation/data.pi similarity index 100% rename from test/mutation.t/data.pi rename to test/mutation/data.pi diff --git a/test/mutation/dune b/test/mutation/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/mutation/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/mutation.t/run.t b/test/mutation/run.t similarity index 100% rename from test/mutation.t/run.t rename to test/mutation/run.t diff --git a/test/operators.t/data.pi b/test/operators/data.pi similarity index 100% rename from test/operators.t/data.pi rename to test/operators/data.pi diff --git a/test/operators/dune b/test/operators/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/operators/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/operators.t/run.t b/test/operators/run.t similarity index 100% rename from test/operators.t/run.t rename to test/operators/run.t diff --git a/test/parse_error/dune b/test/parse_error/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/parse_error/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/parse_error.t/empty_template_expression.pi b/test/parse_error/empty_template_expression.pi similarity index 100% rename from test/parse_error.t/empty_template_expression.pi rename to test/parse_error/empty_template_expression.pi diff --git a/test/parse_error.t/let_without_expression.pi b/test/parse_error/let_without_expression.pi similarity index 100% rename from test/parse_error.t/let_without_expression.pi rename to test/parse_error/let_without_expression.pi diff --git a/test/parse_error.t/mutation_without_expression.pi b/test/parse_error/mutation_without_expression.pi similarity index 100% rename from test/parse_error.t/mutation_without_expression.pi rename to test/parse_error/mutation_without_expression.pi diff --git a/test/parse_error.t/run.t b/test/parse_error/run.t similarity index 100% rename from test/parse_error.t/run.t rename to test/parse_error/run.t diff --git a/test/parse_error.t/string_interpolation.pi b/test/parse_error/string_interpolation.pi similarity index 100% rename from test/parse_error.t/string_interpolation.pi rename to test/parse_error/string_interpolation.pi diff --git a/test/parse_error.t/tag_transformer_function.pi b/test/parse_error/tag_transformer_function.pi similarity index 100% rename from test/parse_error.t/tag_transformer_function.pi rename to test/parse_error/tag_transformer_function.pi diff --git a/test/portal/dune b/test/portal/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/portal/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/portal.t/main.pi b/test/portal/main.pi similarity index 100% rename from test/portal.t/main.pi rename to test/portal/main.pi diff --git a/test/portal.t/run.t b/test/portal/run.t similarity index 100% rename from test/portal.t/run.t rename to test/portal/run.t diff --git a/test/record.t/data.pi b/test/record/data.pi similarity index 100% rename from test/record.t/data.pi rename to test/record/data.pi diff --git a/test/record/dune b/test/record/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/record/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/record.t/run.t b/test/record/run.t similarity index 100% rename from test/record.t/run.t rename to test/record/run.t diff --git a/test/slot.t/SlotProvider.pi b/test/slot/SlotProvider.pi similarity index 100% rename from test/slot.t/SlotProvider.pi rename to test/slot/SlotProvider.pi diff --git a/test/slot.t/SubComponent.pi b/test/slot/SubComponent.pi similarity index 100% rename from test/slot.t/SubComponent.pi rename to test/slot/SubComponent.pi diff --git a/test/slot.t/data.pi b/test/slot/data.pi similarity index 100% rename from test/slot.t/data.pi rename to test/slot/data.pi diff --git a/test/slot/dune b/test/slot/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/slot/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/slot.t/run.t b/test/slot/run.t similarity index 100% rename from test/slot.t/run.t rename to test/slot/run.t diff --git a/test/store.t/StoreValueProvider.pi b/test/store/StoreValueProvider.pi similarity index 100% rename from test/store.t/StoreValueProvider.pi rename to test/store/StoreValueProvider.pi diff --git a/test/store/dune b/test/store/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/store/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/store.t/run.t b/test/store/run.t similarity index 100% rename from test/store.t/run.t rename to test/store/run.t diff --git a/test/store.t/stores.pi b/test/store/stores.pi similarity index 100% rename from test/store.t/stores.pi rename to test/store/stores.pi diff --git a/test/template.t/data.pi b/test/template.t/data.pi deleted file mode 100644 index bafe75f..0000000 --- a/test/template.t/data.pi +++ /dev/null @@ -1,28 +0,0 @@ -component Component( - label: "Section", - icon: "/images/icons/group.svg", - group: "Structure", -) { - let intro = true; - let name = if (intro) "String Template" else "World"; - let content = "Hello, $(name)!"; - -
-
- {if (intro) { - let foobar = "foo"; - if (foobar) { -
- } else { - let barfoo = "3"; - - } - }} -
- {content} -
- -
-} diff --git a/test/template.t/run.t b/test/template.t/run.t deleted file mode 100644 index bac8a2c..0000000 --- a/test/template.t/run.t +++ /dev/null @@ -1,12 +0,0 @@ - $ print . Component -
-
-
-
- Hello, String Template! -
- -
- diff --git a/test/template/data.pi b/test/template/data.pi new file mode 100644 index 0000000..824dc39 --- /dev/null +++ b/test/template/data.pi @@ -0,0 +1,45 @@ +page Template( + label: "Page", + icon: "/images/icons/page.svg", + group: "pages", +) { + let intro = true; + let name = if (intro) "String Template" else "World"; + let content = "Hello, $(name)!"; + + <> + + + + + + FOO + + + + + + + +
+
+ {if (intro) { + let foobar = "foo"; + if (foobar) { +
+ } else { + let barfoo = "3"; + + } + }} +
+ {content} +
+ +
+ + + +} diff --git a/test/template/dune b/test/template/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/template/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/template/run.t b/test/template/run.t new file mode 100644 index 0000000..5316003 --- /dev/null +++ b/test/template/run.t @@ -0,0 +1,27 @@ + $ print . Template + + + + + + FOO + + + + + + + +
+
+
+
+ Hello, String Template! +
+ +
+ + + diff --git a/test/test.t/data.pi b/test/test/data.pi similarity index 100% rename from test/test.t/data.pi rename to test/test/data.pi diff --git a/test/test/dune b/test/test/dune new file mode 100644 index 0000000..35d1cce --- /dev/null +++ b/test/test/dune @@ -0,0 +1,4 @@ +(cram + (deps + %{bin:print} + (source_tree .))) diff --git a/test/test.t/run.t b/test/test/run.t similarity index 100% rename from test/test.t/run.t rename to test/test/run.t -- 2.51.2