diff options
Diffstat (limited to 'tests/check_error.c')
-rw-r--r-- | tests/check_error.c | 24 |
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); } |