diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-07-03 06:05:39 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-07-03 06:05:39 +0200 |
commit | b431f79db6deb75229748f80a3e9e448b6dacf31 (patch) | |
tree | e7ffe0864ab6e0db213afcb0e2a260d27b663d69 /tests/check_source_parser.c | |
parent | 3968529cad2baec099acff5fee47b5fe24624b03 (diff) | |
download | blogc-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_source_parser.c')
-rw-r--r-- | tests/check_source_parser.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tests/check_source_parser.c b/tests/check_source_parser.c index 2dcaad6..d94dc70 100644 --- a/tests/check_source_parser.c +++ b/tests/check_source_parser.c @@ -220,9 +220,7 @@ test_source_parse_config_invalid_key(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Can't find a configuration key or the content separator.\n" - "Error occurred near line 1, position 1:\n" - "bola: guda\n" - "^"); + "Error occurred near line 1, position 1: bola: guda"); blogc_error_free(err); sb_trie_free(source); } @@ -238,9 +236,7 @@ test_source_parse_config_no_key(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Invalid configuration key.\n" - "Error occurred near line 1, position 4:\n" - "BOLa\n" - " ^"); + "Error occurred near line 1, position 4: BOLa"); blogc_error_free(err); sb_trie_free(source); } @@ -256,9 +252,7 @@ test_source_parse_config_no_key2(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Your last configuration key is missing ':' and the value\n" - "Error occurred near line 1, position 5:\n" - "BOLA\n" - " ^"); + "Error occurred near line 1, position 5: BOLA"); blogc_error_free(err); sb_trie_free(source); } @@ -275,9 +269,7 @@ test_source_parse_config_no_value(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Configuration value not provided for 'BOLA'.\n" - "Error occurred near line 1, position 6:\n" - "BOLA:\n" - " ^"); + "Error occurred near line 1, position 6: BOLA:"); blogc_error_free(err); sb_trie_free(source); } @@ -294,9 +286,7 @@ test_source_parse_config_no_value2(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Configuration value not provided for 'BOLA'.\n" - "Error occurred near line 1, position 6:\n" - "BOLA:\n" - " ^"); + "Error occurred near line 1, position 6: BOLA:"); blogc_error_free(err); sb_trie_free(source); } @@ -500,9 +490,7 @@ test_source_parse_config_value_no_line_ending(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "No line ending after the configuration value for 'BOLA'.\n" - "Error occurred near line 1, position 10:\n" - "BOLA: asd\n" - " ^"); + "Error occurred near line 1, position 10: BOLA: asd"); blogc_error_free(err); sb_trie_free(source); } @@ -519,9 +507,7 @@ test_source_parse_invalid_separator(void **state) assert_int_equal(err->type, BLOGC_ERROR_SOURCE_PARSER); assert_string_equal(err->msg, "Invalid content separator. Must be more than one '-' characters.\n" - "Error occurred near line 2, position 4:\n" - "---#\n" - " ^"); + "Error occurred near line 2, position 4: ---#"); blogc_error_free(err); sb_trie_free(source); } |