diff options
author | Magnus Lidén <[email protected]> | 2014-01-21 16:41:02 +0100 |
---|---|---|
committer | Magnus Lidén <[email protected]> | 2014-01-21 16:41:02 +0100 |
commit | 811c3040a2a6f7ee2b8f19e07ef0795f2bab754c (patch) | |
tree | 1504890a11d461f15f099f896d6b8090f8a702f5 /lib/xmerl/test/xmerl_sax_SUITE.erl | |
parent | f836096cb383c6a3c5c91956ded5bd4e2772bcd2 (diff) | |
parent | 7042cc483b7e48eeacc99a47676e8593f288285b (diff) | |
download | otp-811c3040a2a6f7ee2b8f19e07ef0795f2bab754c.tar.gz otp-811c3040a2a6f7ee2b8f19e07ef0795f2bab754c.tar.bz2 otp-811c3040a2a6f7ee2b8f19e07ef0795f2bab754c.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/xmerl/test/xmerl_sax_SUITE.erl')
-rw-r--r-- | lib/xmerl/test/xmerl_sax_SUITE.erl | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/lib/xmerl/test/xmerl_sax_SUITE.erl b/lib/xmerl/test/xmerl_sax_SUITE.erl index 563bbaaa06..10a96f470b 100644 --- a/lib/xmerl/test/xmerl_sax_SUITE.erl +++ b/lib/xmerl/test/xmerl_sax_SUITE.erl @@ -67,7 +67,8 @@ end_per_testcase(_Func,_Config) -> %% Description: Checks that end of document is checked properly when continuation fun is missing. ticket_8213(suite) -> []; ticket_8213(_Config) -> - ?line {ok,ok,[]} = xmerl_sax_parser:stream("<elem/>", [{event_fun, fun (_E,_,_) -> ok end}]). + ?line {ok,ok,[]} = xmerl_sax_parser:stream("<elem/>", [{event_fun, fun (_E,_,_) -> ok end}]), + ok. %%---------------------------------------------------------------------- @@ -86,7 +87,35 @@ ticket_8214(_Config) -> ({startElement, _, "elem",_,_}, _,_) -> throw({test, "Error in startElement tuple"}); (_E,_,_) -> ok - end}]). + end}]), + ok. + +%%---------------------------------------------------------------------- +%% Test Case +%% ID: ticket_8214 +%% Description: Checks that attributes with default namespace don't get [] in NS field. +ticket_11551(suite) -> []; +ticket_11551(Config) -> + Stream1 = <<"<?xml version=\"1.0\" encoding=\"utf-8\" ?> +<a>hej</a> +<?xml version=\"1.0\" encoding=\"utf-8\" ?> +<a>hej</a>">>, + ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream1, []), + Stream2= <<"<?xml version=\"1.0\" encoding=\"utf-8\" ?> +<a>hej</a> + + +<?xml version=\"1.0\" encoding=\"utf-8\" ?> +<a>hej</a>">>, + ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream2, []), + Stream3= <<"<a>hej</a> + +<?xml version=\"1.0\" encoding=\"utf-8\" ?> +<a>hej</a>">>, + ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream3, []), + ok. + + %%---------------------------------------------------------------------- %% Bug test cases @@ -99,7 +128,7 @@ all() -> [{group, bugs}]. groups() -> - [{bugs, [], [ticket_8213, ticket_8214]}]. + [{bugs, [], [ticket_8213, ticket_8214, ticket_11551]}]. init_per_group(_GroupName, Config) -> Config. |