diff options
author | Henrik Nord <[email protected]> | 2015-10-27 12:55:25 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-10-27 12:55:25 +0100 |
commit | 1d6f49bfc5222217579540bd13c47a02e61896a9 (patch) | |
tree | 235b7e58fdfe6e99886c6367a5a23d7495aca0ec /lib/xmerl/test/xmerl_xsd_SUITE.erl | |
parent | 4b5853e7865d6a1baab39d7345b1b8d0280a4291 (diff) | |
parent | 7dc9eefa341fbfae0ebc55a88b96a375c611e3a4 (diff) | |
download | otp-1d6f49bfc5222217579540bd13c47a02e61896a9.tar.gz otp-1d6f49bfc5222217579540bd13c47a02e61896a9.tar.bz2 otp-1d6f49bfc5222217579540bd13c47a02e61896a9.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/xmerl/test/xmerl_xsd_SUITE.erl')
-rw-r--r-- | lib/xmerl/test/xmerl_xsd_SUITE.erl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/xmerl/test/xmerl_xsd_SUITE.erl b/lib/xmerl/test/xmerl_xsd_SUITE.erl index 101fbcd50f..92c8287782 100644 --- a/lib/xmerl/test/xmerl_xsd_SUITE.erl +++ b/lib/xmerl/test/xmerl_xsd_SUITE.erl @@ -41,7 +41,8 @@ groups() -> [{group, primitive_datatypes}, {group, derived_datatypes}]}, {validation_tests, [], - [{group, xmlSchemaPrimerExamples}, + [{group, xmlXsdAndExample}, + {group, xmlSchemaPrimerExamples}, {group, miscXMLexamples}]}, {primitive_datatypes, [], [string, boolean, decimal, float, double, duration, @@ -55,6 +56,8 @@ groups() -> negativeInteger, long, int, short, byte, nonNegativeInteger, unsignedLong, unsignedInt, unsignedShort, unsignedByte, positiveInteger]}, + {xmlXsdAndExample, [], + [xml_xsd, xml_lang_attr]}, {xmlSchemaPrimerExamples, [], [po, po1, po2, ipo, ipo_redefine, '4Q99']}, {miscXMLexamples, [], @@ -863,6 +866,19 @@ compare_duration(_Config) -> ?line indefinite = xmerl_xsd_type:compare_durations("P5M","P153D"), ?line lt = xmerl_xsd_type:compare_durations("P5M","P154D"). +xml_xsd(suite) -> []; +xml_xsd(Config) -> + DataDir = ?config(data_dir, Config), + Options = [{fetch_path, [DataDir]}], + {ok, _} = xmerl_xsd:process_schema("xml.xsd", Options). + +xml_lang_attr(suite) -> []; +xml_lang_attr(Config) -> + DataDir = ?config(data_dir, Config), + {Element, _} = xmerl_scan:file(filename:join([DataDir, "book.xml"])), + Options = [{fetch_path, [DataDir]}], + {ok, Schema} = xmerl_xsd:process_schema("book.xsd", Options), + {Element, _} = xmerl_xsd:validate(Element, Schema). po(suite) -> []; po(Config) -> |