ソースを参照

Added a test (not working yet)

Chimrod 5 ヶ月 前
コミット
87ef4310f3
1 ファイル変更4 行追加0 行削除
  1. 4 0
      test/syntax.ml

+ 4 - 0
test/syntax.ml

@@ -882,6 +882,9 @@ let test_stattxt () =
             { Tree.Ast.pos = _position; name = "$STATTXT"; index = None } );
             { Tree.Ast.pos = _position; name = "$STATTXT"; index = None } );
     ]
     ]
 
 
+let test_for_end () = _test_instruction {|for a = 1 to 10:
+end|} []
+
 let test =
 let test =
   ( "Syntax",
   ( "Syntax",
     [
     [
@@ -951,4 +954,5 @@ let test =
       Alcotest.test_case "Precedence7" `Quick test_precedence7;
       Alcotest.test_case "Precedence7" `Quick test_precedence7;
       Alcotest.test_case "Precedence8" `Quick test_precedence8;
       Alcotest.test_case "Precedence8" `Quick test_precedence8;
       Alcotest.test_case "stattxt" `Quick test_stattxt;
       Alcotest.test_case "stattxt" `Quick test_stattxt;
+      Alcotest.test_case "for ... end" `Quick test_for_end;
     ] )
     ] )