diff options
Diffstat (limited to 'testsuite/tests/parse-errors')
19 files changed, 84 insertions, 65 deletions
diff --git a/testsuite/tests/parse-errors/escape_error.ml b/testsuite/tests/parse-errors/escape_error.ml index 2a8e99b61d..4206123f6c 100644 --- a/testsuite/tests/parse-errors/escape_error.ml +++ b/testsuite/tests/parse-errors/escape_error.ml @@ -1,5 +1,5 @@ -(* TEST - * toplevel +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) *) (* Nothing to see here, parse.ml dictates that these be printed as regular @@ -10,3 +10,7 @@ try foo () with ;; (3 : );; (3 :> );; + +(* TEST + toplevel; +*) diff --git a/testsuite/tests/parse-errors/expecting.ml b/testsuite/tests/parse-errors/expecting.ml index 4298b81868..5f3026b342 100644 --- a/testsuite/tests/parse-errors/expecting.ml +++ b/testsuite/tests/parse-errors/expecting.ml @@ -1,5 +1,5 @@ -(* TEST - * toplevel +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) *) let f = function @@ -33,3 +33,7 @@ let f = function let f = function | (module -> () ;; + +(* TEST + toplevel; +*) diff --git a/testsuite/tests/parse-errors/mismatch_struct_sig.ml b/testsuite/tests/parse-errors/mismatch_struct_sig.ml index 827adb6aff..d22a45a8cb 100644 --- a/testsuite/tests/parse-errors/mismatch_struct_sig.ml +++ b/testsuite/tests/parse-errors/mismatch_struct_sig.ml @@ -1,5 +1,5 @@ -(* TEST - * toplevel +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) *) module type S = struct end @@ -38,3 +38,7 @@ module type S = sig include module type of sig end end ;; + +(* TEST + toplevel; +*) diff --git a/testsuite/tests/parse-errors/pr7847.ml b/testsuite/tests/parse-errors/pr7847.ml index 8018109b1e..6c2e9fd531 100644 --- a/testsuite/tests/parse-errors/pr7847.ml +++ b/testsuite/tests/parse-errors/pr7847.ml @@ -1,10 +1,17 @@ -(* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + *) (* https://caml.inria.fr/mantis/view.php?id=7847 The backquote causes a syntax error; this file should be rejected. *) external x : unit -> (int,int)`A.t = "x" + +(* TEST + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; +*) diff --git a/testsuite/tests/parse-errors/unclosed_class_signature.mli b/testsuite/tests/parse-errors/unclosed_class_signature.mli index 0aa6bf494e..659c8b9a48 100644 --- a/testsuite/tests/parse-errors/unclosed_class_signature.mli +++ b/testsuite/tests/parse-errors/unclosed_class_signature.mli @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) (* It is apparently impossible to get the "unclosed object" message. *) diff --git a/testsuite/tests/parse-errors/unclosed_class_simpl_expr1.ml b/testsuite/tests/parse-errors/unclosed_class_simpl_expr1.ml index 86466d8155..d0bc47ba96 100644 --- a/testsuite/tests/parse-errors/unclosed_class_simpl_expr1.ml +++ b/testsuite/tests/parse-errors/unclosed_class_simpl_expr1.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) class c = object diff --git a/testsuite/tests/parse-errors/unclosed_class_simpl_expr2.ml b/testsuite/tests/parse-errors/unclosed_class_simpl_expr2.ml index dc762fd252..edb21933f2 100644 --- a/testsuite/tests/parse-errors/unclosed_class_simpl_expr2.ml +++ b/testsuite/tests/parse-errors/unclosed_class_simpl_expr2.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) class c = (object end : object end diff --git a/testsuite/tests/parse-errors/unclosed_class_simpl_expr3.ml b/testsuite/tests/parse-errors/unclosed_class_simpl_expr3.ml index 142d3b09e0..3b689293cf 100644 --- a/testsuite/tests/parse-errors/unclosed_class_simpl_expr3.ml +++ b/testsuite/tests/parse-errors/unclosed_class_simpl_expr3.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) class c = (object end diff --git a/testsuite/tests/parse-errors/unclosed_object.ml b/testsuite/tests/parse-errors/unclosed_object.ml index c74a71357c..6528ea09f8 100644 --- a/testsuite/tests/parse-errors/unclosed_object.ml +++ b/testsuite/tests/parse-errors/unclosed_object.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) (* Failed to get the unclosed object error message. *) diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_expr1.ml b/testsuite/tests/parse-errors/unclosed_paren_module_expr1.ml index b22a3fb4fb..259f2799a2 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_expr1.ml +++ b/testsuite/tests/parse-errors/unclosed_paren_module_expr1.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = (struct end : sig end diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_expr2.ml b/testsuite/tests/parse-errors/unclosed_paren_module_expr2.ml index a786f351b7..44ac330bc3 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_expr2.ml +++ b/testsuite/tests/parse-errors/unclosed_paren_module_expr2.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = (struct end diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_expr3.ml b/testsuite/tests/parse-errors/unclosed_paren_module_expr3.ml index 4c5c78585d..9cc8d6e6c5 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_expr3.ml +++ b/testsuite/tests/parse-errors/unclosed_paren_module_expr3.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = (val 3 : diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_expr4.ml b/testsuite/tests/parse-errors/unclosed_paren_module_expr4.ml index fc3daefcc3..075d5c599e 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_expr4.ml +++ b/testsuite/tests/parse-errors/unclosed_paren_module_expr4.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = (val 3 :> diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_expr5.ml b/testsuite/tests/parse-errors/unclosed_paren_module_expr5.ml index 8ce6c0b21c..68a044256d 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_expr5.ml +++ b/testsuite/tests/parse-errors/unclosed_paren_module_expr5.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = (val 3 diff --git a/testsuite/tests/parse-errors/unclosed_paren_module_type.mli b/testsuite/tests/parse-errors/unclosed_paren_module_type.mli index 436ce5dc27..e428959842 100644 --- a/testsuite/tests/parse-errors/unclosed_paren_module_type.mli +++ b/testsuite/tests/parse-errors/unclosed_paren_module_type.mli @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M : (sig end diff --git a/testsuite/tests/parse-errors/unclosed_sig.mli b/testsuite/tests/parse-errors/unclosed_sig.mli index af49ea4079..12b4d3c975 100644 --- a/testsuite/tests/parse-errors/unclosed_sig.mli +++ b/testsuite/tests/parse-errors/unclosed_sig.mli @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M : sig diff --git a/testsuite/tests/parse-errors/unclosed_simple_expr.ml b/testsuite/tests/parse-errors/unclosed_simple_expr.ml index f5a9e3b7f2..3a94e4cee8 100644 --- a/testsuite/tests/parse-errors/unclosed_simple_expr.ml +++ b/testsuite/tests/parse-errors/unclosed_simple_expr.ml @@ -1,5 +1,5 @@ (* TEST - * toplevel + toplevel; *) (3; 2;; diff --git a/testsuite/tests/parse-errors/unclosed_simple_pattern.ml b/testsuite/tests/parse-errors/unclosed_simple_pattern.ml index f0878848bb..4c4c052e2c 100644 --- a/testsuite/tests/parse-errors/unclosed_simple_pattern.ml +++ b/testsuite/tests/parse-errors/unclosed_simple_pattern.ml @@ -1,5 +1,5 @@ (* TEST - * toplevel + toplevel; *) let f = function diff --git a/testsuite/tests/parse-errors/unclosed_struct.ml b/testsuite/tests/parse-errors/unclosed_struct.ml index 6066f1e826..5b05335e73 100644 --- a/testsuite/tests/parse-errors/unclosed_struct.ml +++ b/testsuite/tests/parse-errors/unclosed_struct.ml @@ -1,8 +1,8 @@ (* TEST -* setup-ocamlc.byte-build-env -** ocamlc.byte -ocamlc_byte_exit_status = "2" -*** check-ocamlc.byte-output + setup-ocamlc.byte-build-env; + ocamlc_byte_exit_status = "2"; + ocamlc.byte; + check-ocamlc.byte-output; *) module M = struct |