From a55cf39cc236548b3d316c14e941ea2974a72b41 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:34:48 -0400 Subject: [PATCH] add @ error tests --- tests/at-error.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/at-error.rs diff --git a/tests/at-error.rs b/tests/at-error.rs new file mode 100644 index 0000000..2d9f873 --- /dev/null +++ b/tests/at-error.rs @@ -0,0 +1,15 @@ +#![cfg(test)] + +#[macro_use] +mod macros; + +error!( + error_dblquoted_string, + "a {\n @error \"hi\";\n}\n", "Error: \"hi\"" +); +error!( + error_sglquoted_string, + "a {\n @error 'hi';\n}\n", "Error: \"hi\"" +); +error!(error_unquoted_string, "a {\n @error hi;\n}\n", "Error: hi"); +error!(error_arithmetic, "a {\n @error 1 + 1;\n}\n", "Error: 2");