aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check_error.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-07-03 06:05:39 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-07-03 06:05:39 +0200
commitb431f79db6deb75229748f80a3e9e448b6dacf31 (patch)
treee7ffe0864ab6e0db213afcb0e2a260d27b663d69 /tests/check_error.c
parent3968529cad2baec099acff5fee47b5fe24624b03 (diff)
downloadblogc-b431f79db6deb75229748f80a3e9e448b6dacf31.tar.gz
blogc-b431f79db6deb75229748f80a3e9e448b6dacf31.tar.bz2
blogc-b431f79db6deb75229748f80a3e9e448b6dacf31.zip
Revert "error: improved parser error reporting"
this will not work properly for unicode chars This reverts commit 3968529cad2baec099acff5fee47b5fe24624b03.
Diffstat (limited to 'tests/check_error.c')
-rw-r--r--tests/check_error.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/check_error.c b/tests/check_error.c
index a954095..8818b00 100644
--- a/tests/check_error.c
+++ b/tests/check_error.c
@@ -49,27 +49,21 @@ test_error_parser(void **state)
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 3, position 2:\n"
- "chunda\n"
- " ^");
+ "asd 10\nError occurred near line 3, position 2: chunda");
blogc_error_free(error);
a = "bola\nguda\nchunda";
error = blogc_error_parser(1, a, strlen(a), 11, "asd %d", 10);
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 3, position 2:\n"
- "chunda\n"
- " ^");
+ "asd 10\nError occurred near line 3, position 2: chunda");
blogc_error_free(error);
a = "bola\nguda\nchunda";
error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10);
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 1, position 1:\n"
- "bola\n"
- "^");
+ "asd 10\nError occurred near line 1, position 1: bola");
blogc_error_free(error);
a = "";
error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10);
@@ -88,27 +82,21 @@ test_error_parser_crlf(void **state)
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 3, position 2:\n"
- "chunda\n"
- " ^");
+ "asd 10\nError occurred near line 3, position 2: chunda");
blogc_error_free(error);
a = "bola\r\nguda\r\nchunda";
error = blogc_error_parser(1, a, strlen(a), 13, "asd %d", 10);
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 3, position 2:\n"
- "chunda\n"
- " ^");
+ "asd 10\nError occurred near line 3, position 2: chunda");
blogc_error_free(error);
a = "bola\r\nguda\r\nchunda";
error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10);
assert_non_null(error);
assert_int_equal(error->type, 1);
assert_string_equal(error->msg,
- "asd 10\nError occurred near line 1, position 1:\n"
- "bola\n"
- "^");
+ "asd 10\nError occurred near line 1, position 1: bola");
blogc_error_free(error);
}