aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/test/xmerl_sax_SUITE.erl
diff options
context:
space:
mode:
authorMagnus Lidén <[email protected]>2014-01-21 16:41:02 +0100
committerMagnus Lidén <[email protected]>2014-01-21 16:41:02 +0100
commit811c3040a2a6f7ee2b8f19e07ef0795f2bab754c (patch)
tree1504890a11d461f15f099f896d6b8090f8a702f5 /lib/xmerl/test/xmerl_sax_SUITE.erl
parentf836096cb383c6a3c5c91956ded5bd4e2772bcd2 (diff)
parent7042cc483b7e48eeacc99a47676e8593f288285b (diff)
downloadotp-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.erl35
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.