aboutsummaryrefslogtreecommitdiff
path: root/test/nested_string.ml
diff options
context:
space:
mode:
Diffstat (limited to 'test/nested_string.ml')
-rw-r--r--test/nested_string.ml27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/nested_string.ml b/test/nested_string.ml
new file mode 100644
index 0000000..b121667
--- /dev/null
+++ b/test/nested_string.ml
@@ -0,0 +1,27 @@
+module Check = Make_checkTest.M (Qsp_syntax.Nested_strings)
+
+let _position = (Lexing.dummy_pos, Lexing.dummy_pos)
+
+let _test_instruction : string -> Qsp_syntax.Report.t list -> unit =
+ Check._test_instruction
+
+let nothing () = _test_instruction {|
+"value = <<$variable>>"
+ |} []
+
+let simple_expression () =
+ _test_instruction {|"<<$variable>>"|}
+ [
+ {
+ level = Debug;
+ loc = _position;
+ message = "This expression can be simplified";
+ };
+ ]
+
+let test =
+ ( "Nested_strings checker",
+ [
+ Alcotest.test_case "Ok" `Quick nothing;
+ Alcotest.test_case "Simple expression" `Quick simple_expression;
+ ] )