Update testsuite following update of exceptions

Exceptions were modified:
    o  The message doesn't end with "\n" anymore.
    o  The invalid option exception format now reflects the common
       format.
This commit is contained in:
Jean-Sébastien Pédron 2011-05-31 09:03:52 +02:00
parent f0d13e10bd
commit 190bc1e33a
24 changed files with 49 additions and 46 deletions

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,undefined,undefined,error,
invalid_unicode, "Invalid Unicode character at byte #4\n", undefined,
invalid_unicode, "Invalid Unicode character at byte #4", undefined,
[{byte,4}]}
],
[

View File

@ -40,10 +40,10 @@
false,
[
{yaml_parser_error,2,15,warning,reserved_indicator,
"The reserved indicator \"`\" is not allowed at the beginning of a plain scalar\n",
"The reserved indicator \"`\" is not allowed at the beginning of a plain scalar",
undefined,[]},
{yaml_parser_error,1,16,warning,reserved_indicator,
"The reserved indicator \"@\" is not allowed at the beginning of a plain scalar\n",
"The reserved indicator \"@\" is not allowed at the beginning of a plain scalar",
undefined,[]}
],
[

View File

@ -40,11 +40,11 @@
false,
[
{yaml_parser_error,3,3,warning,invalid_escaped_character,
"Invalid escaped character\n",
"Invalid escaped character",
{yaml_scalar,2,3,{yaml_tag,2,3,{non_specific,"!"}},flow,double_quoted,"c "},
[]},
{yaml_parser_error,2,4,warning,invalid_escaped_character,
"Invalid escaped character\n",
"Invalid escaped character",
{yaml_scalar,2,3,{yaml_tag,2,3,{non_specific,"!"}},flow,double_quoted,""},
[]}
],

View File

@ -40,7 +40,7 @@
false,
[
{yaml_parser_error,1,1,warning,reserved_directive,
"Reserved directive \"FOO\" ignored\n",
"Reserved directive \"FOO\" ignored",
{yaml_reserved_directive,1,1,"FOO",["bar","baz"],2},
[]}
],

View File

@ -40,7 +40,7 @@
false,
[
{yaml_parser_error,3,1,warning,version_not_supported,
"Version 1.3 not supported (maximum version 1.2); parsing may fail\n",
"Version 1.3 not supported (maximum version 1.2); parsing may fail",
{yaml_doc_start,3,1,{1,3},_},
[]}
],

View File

@ -40,7 +40,7 @@
false,
[
{yaml_parser_error,2,1,warning,multiple_yaml_directives,
"Multiple YAML directives found: the last one will be used\n",
"Multiple YAML directives found: the last one will be used",
{yaml_yaml_directive,2,1,{1,1}},
[]}
],

View File

@ -41,7 +41,7 @@
[
{yaml_parser_error,2,1,warning,
multiple_tag_handle_declarations,
"Multiple declarations of the same handle found: the last one will be used\n",
"Multiple declarations of the same handle found: the last one will be used",
{yaml_tag_directive,2,1,"!","!foo"},
[]}
],

View File

@ -41,11 +41,11 @@
true,
[
{yaml_parser_error,2,3,warning,invalid_uri,
"Invalid character in URI scheme\n",
"Invalid character in URI scheme",
{yaml_tag,2,3,"$:?"},
[]},
{yaml_parser_error,1,7,error,invalid_tag_handle,
"Local tag suffix mandatory\n",
"Local tag suffix mandatory",
{yaml_tag,1,3,"!"},
[]}
],

View File

@ -41,11 +41,11 @@
true,
[
{yaml_parser_error,4,9,error,undeclared_tag_handle,
"Tag handle \"!h!\" never declared\n",
"Tag handle \"!h!\" never declared",
{yaml_tag,4,3,"!h!bar"},
[]},
{yaml_parser_error,3,6,error,invalid_tag_handle,
"Tag suffix mandatory\n",
"Tag suffix mandatory",
{yaml_tag,3,3,"!e!"},
[]}
],

View File

@ -40,10 +40,10 @@
false,
[
{yaml_parser_error,4,2,warning,invalid_implicit_key,
"An implicit key must not take more than 1024 characters\n",
"An implicit key must not take more than 1024 characters",
undefined,[]},
{yaml_parser_error,1,3,warning,invalid_implicit_key,
"An implicit key must not span several lines\n",
"An implicit key must not span several lines",
undefined,[]}
],
[

View File

@ -41,7 +41,7 @@
[
{yaml_parser_error,3,2,warning,
leading_empty_lines_too_long,
"A leading all-space line has too many spaces (2) compared to detected indentation (1)\n",
"A leading all-space line has too many spaces (2) compared to detected indentation (1)",
{yaml_scalar,1,3,{yaml_tag,1,3,{non_specific,"!"}},block,literal,[]},
[]}
],

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,3,2,error,invalid_block_scalar_indentation,
"Invalid block scalar indentation\n",
"Invalid block scalar indentation",
{yaml_scalar,1,3,{yaml_tag,1,3,{non_specific,"!"}},block,folded,"text"},
[]}
],

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,2,2,error,invalid_block_scalar_indentation,
"Invalid block scalar indentation\n",
"Invalid block scalar indentation",
{yaml_scalar,1,3,{yaml_tag,1,3,{non_specific,"!"}},block,literal,[]},
[]}
],

View File

@ -40,7 +40,7 @@
false,
[
{yaml_parser_error,2,3,warning,invalid_implicit_key,
"An implicit key must not span several lines\n",
"An implicit key must not span several lines",
undefined,[]}
],
[

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,2,1,error,flow_collection_entry_not_allowed,
"Empty flow collection entry not allowed\n",undefined,[]}
"Empty flow collection entry not allowed",undefined,[]}
],
[
{yaml_stream_end,3,2},

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,3,1,error,unpected_token,
"Unexpected \"yaml_scalar\" token following a \"yaml_scalar\" token\n",
"Unexpected \"yaml_scalar\" token following a \"yaml_scalar\" token",
{yaml_scalar,3,1,
{yaml_tag,3,1,{non_specific,"!"}},
flow,double_quoted,"item2"},

View File

@ -40,13 +40,13 @@
false,
[
{yaml_parser_error,3,45,warning,non_ascii_line_break,
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character\n",
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character",
undefined,[]},
{yaml_parser_error,3,25,warning,non_ascii_line_break,
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character\n",
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character",
undefined,[]},
{yaml_parser_error,3,10,warning,non_ascii_line_break,
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character\n",
"Use of non-ASCII line break is not supported anymore starting with YAML 1.2; treated as non-break character",
undefined,[]}
],
[

View File

@ -2,11 +2,12 @@
%% TEST
?_assertThrow(
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"doc_version\": it must be a tuple of the form {Major, Minor} where Major and Minor are positive integers\n",
undefined,
[{option,{doc_version,invalid}}]
},
{yaml_parser,
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"doc_version\": it must be a tuple of the form {Major, Minor} where Major and Minor are positive integers",
undefined,
[{option,{doc_version,invalid}}]
}},
yaml_parser:file("${FILENAME}", [{doc_version, invalid}])
)

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,1,1,error,version_not_supported,
"Version 2.0 not supported (maximum version 1.2)\n",
"Version 2.0 not supported (maximum version 1.2)",
{yaml_doc_start,1,1,{2,0},_},
[]}
],

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,1,1,error,version_not_supported,
"Version 0.9 not supported (minimum version 1.1)\n",
"Version 0.9 not supported (minimum version 1.1)",
{yaml_doc_start,1,1,{0,9},_},
[]}
],

View File

@ -2,11 +2,12 @@
%% TEST
?_assertThrow(
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"io_blocksize\": it must be a positive interger, expressed in bytes\n",
undefined,
[{option,{io_blocksize,invalid}}]
},
{yaml_parser,
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"io_blocksize\": it must be a positive interger, expressed in bytes",
undefined,
[{option,{io_blocksize,invalid}}]
}},
yaml_parser:file("${FILENAME}", [{io_blocksize, invalid}])
)

View File

@ -2,11 +2,12 @@
%% TEST
?_assertThrow(
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"token_fun\": it must be a function taking the parser state as its sole argument\n",
undefined,
[{option,{token_fun,invalid}}]
},
{yaml_parser,
{yaml_parser_error,undefined,undefined,error,
invalid_parser_option,
"Invalid value for option \"token_fun\": it must be a function taking the parser state as its sole argument",
undefined,
[{option,{token_fun,invalid}}]
}},
yaml_parser:string(<<>>, [{token_fun, invalid}])
)

View File

@ -40,7 +40,7 @@
false,
[
{yaml_parser_error,2,1,warning,version_not_supported,
"Version 1.3 not supported (maximum version 1.2); parsing may fail\n",
"Version 1.3 not supported (maximum version 1.2); parsing may fail",
{yaml_doc_start,2,1,{1,3},_},
[]}
],

View File

@ -41,7 +41,7 @@
true,
[
{yaml_parser_error,2,1,error,version_not_supported,
"Version 2.0 not supported (maximum version 1.2)\n",
"Version 2.0 not supported (maximum version 1.2)",
{yaml_doc_start,2,1,{2,0},_},
[]}
],