mirror of
https://github.com/valitydev/yamerl.git
synced 2024-11-06 02:45:23 +00:00
Testsuite for non-ASCII line breaks
This commit is contained in:
parent
69c522a57d
commit
554c88e8bb
@ -0,0 +1,54 @@
|
||||
%% vim:ft=erlang:
|
||||
|
||||
%% TEST
|
||||
?_assertMatch(
|
||||
{yaml_parser,
|
||||
{file,"${FILENAME}"},
|
||||
<<>>,
|
||||
62,
|
||||
true,
|
||||
[],
|
||||
0,
|
||||
58,
|
||||
7,
|
||||
1,
|
||||
false,
|
||||
5,
|
||||
20,
|
||||
utf8,
|
||||
false,
|
||||
undefined,
|
||||
_,
|
||||
_,
|
||||
[],
|
||||
{bcoll,root,0,-1,1,1,-1,1,1},
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
[{impl_key,false,undefined,undefined,undefined,undefined,undefined}],
|
||||
false,
|
||||
false,
|
||||
_,
|
||||
[],
|
||||
0,
|
||||
7,
|
||||
6,
|
||||
undefined,
|
||||
undefined,
|
||||
_,
|
||||
false,
|
||||
[],
|
||||
[
|
||||
{yaml_stream_end,5,20},
|
||||
{yaml_doc_end,5,20},
|
||||
{yaml_scalar,3,1,
|
||||
{yaml_tag,3,1,{non_specific,"?"}},
|
||||
flow,plain,
|
||||
"Next line Line separator Paragraph separator"},
|
||||
{yaml_doc_start,3,1,{1,1},_},
|
||||
{yaml_yaml_directive,1,1,{1,1}},
|
||||
{yaml_stream_start,1,1,utf8}
|
||||
]
|
||||
},
|
||||
yaml_parser:file("${FILENAME}", [{io_blocksize, 1}])
|
||||
)
|
@ -0,0 +1,3 @@
|
||||
%YAML 1.1
|
||||
|
||||
Next line
Line separator
Paragraph separator
|
@ -0,0 +1,67 @@
|
||||
%% vim:ft=erlang:
|
||||
|
||||
%% TEST
|
||||
?_assertMatch(
|
||||
{yaml_parser,
|
||||
{file,"${FILENAME}"},
|
||||
<<>>,
|
||||
62,
|
||||
true,
|
||||
[],
|
||||
0,
|
||||
58,
|
||||
4,
|
||||
1,
|
||||
false,
|
||||
3,
|
||||
46,
|
||||
utf8,
|
||||
false,
|
||||
undefined,
|
||||
_,
|
||||
_,
|
||||
[],
|
||||
{bcoll,root,0,-1,1,1,-1,1,1},
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
[{impl_key,false,undefined,undefined,undefined,undefined,undefined}],
|
||||
false,
|
||||
false,
|
||||
_,
|
||||
[],
|
||||
0,
|
||||
7,
|
||||
6,
|
||||
undefined,
|
||||
undefined,
|
||||
_,
|
||||
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",
|
||||
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",
|
||||
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",
|
||||
undefined,[]}
|
||||
],
|
||||
[
|
||||
{yaml_stream_end,3,46},
|
||||
{yaml_doc_end,3,46},
|
||||
{yaml_scalar,3,1,
|
||||
{yaml_tag,3,1,{non_specific,"?"}},
|
||||
flow,plain,
|
||||
[78,101,120,116,32,108,105,110,101,133,76,105,110,101,
|
||||
32,115,101,112,97,114,97,116,111,114,8232,80,97,114,
|
||||
97,103,114,97,112,104,32,115,101,112,97,114,97,116,
|
||||
111,114,8233]},
|
||||
{yaml_doc_start,3,1,{1,2},_},
|
||||
{yaml_yaml_directive,1,1,{1,2}},
|
||||
{yaml_stream_start,1,1,utf8}
|
||||
]
|
||||
},
|
||||
yaml_parser:file("${FILENAME}", [{io_blocksize, 1}])
|
||||
)
|
@ -0,0 +1,3 @@
|
||||
%YAML 1.2
|
||||
|
||||
Next line
Line separator
Paragraph separator
|
Loading…
Reference in New Issue
Block a user