diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/tests/macros.rs | 8 | ||||
-rw-r--r-- | dhall/tests/tests.rs | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/dhall/tests/macros.rs b/dhall/tests/macros.rs index 5ad2ab3..6031a34 100644 --- a/dhall/tests/macros.rs +++ b/dhall/tests/macros.rs @@ -18,7 +18,13 @@ macro_rules! run_spec_test { }; (parser, $path:expr) => { let expr_str = include_test_str!(concat!($path, "A")); - parser::parse_expr(&expr_str).unwrap(); + parser::parse_expr_pest(&expr_str).map_err(|e| println!("{}", e)).unwrap(); + // parser::parse_expr(&expr_str).unwrap(); + }; + (parser_failure, $path:expr) => { + let expr_str = include_test_str!($path); + parser::parse_expr_pest(&expr_str).map_err(|e| println!("{}", e)).unwrap_err(); + // parser::parse_expr(&expr_str).unwrap(); }; } diff --git a/dhall/tests/tests.rs b/dhall/tests/tests.rs index 6a2ada8..0e097b2 100644 --- a/dhall/tests/tests.rs +++ b/dhall/tests/tests.rs @@ -211,3 +211,13 @@ make_spec_test!(parser, spec_parser_success_union, "parser/success/union"); make_spec_test!(parser, spec_parser_success_urls, "parser/success/urls"); make_spec_test!(parser, spec_parser_success_whitespace, "parser/success/whitespace"); make_spec_test!(parser, spec_parser_success_whitespaceBuffet, "parser/success/whitespaceBuffet"); + +make_spec_test!(parser_failure, spec_parser_failure_annotation, "parser/failure/annotation"); +// make_spec_test!(parser_failure, spec_parser_failure_doubleBoundsNeg, "parser/failure/doubleBoundsNeg"); +// make_spec_test!(parser_failure, spec_parser_failure_doubleBoundsPos, "parser/failure/doubleBoundsPos"); +make_spec_test!(parser_failure, spec_parser_failure_importAccess, "parser/failure/importAccess"); +make_spec_test!(parser_failure, spec_parser_failure_incompleteIf, "parser/failure/incompleteIf"); +make_spec_test!(parser_failure, spec_parser_failure_mandatoryNewline, "parser/failure/mandatoryNewline"); +make_spec_test!(parser_failure, spec_parser_failure_missingSpace, "parser/failure/missingSpace"); +make_spec_test!(parser_failure, spec_parser_failure_spaceAfterListAppend, "parser/failure/spaceAfterListAppend"); +// make_spec_test!(parser_failure, spec_parser_failure_boundBuiltin, "parser/failure/boundBuiltin"); |