Skip to content

Commit

Permalink
Update tests to use newer std tests
Browse files Browse the repository at this point in the history
And re-use the unmodified test suites.

Tests are not regenerate, and new tests not added for now.
  • Loading branch information
dgud committed May 5, 2024
1 parent b8d646f commit 58a2976
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 16 deletions.
12 changes: 5 additions & 7 deletions lib/xmerl/test/xmerl_sax_std_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@

init_per_suite(Config) ->
file:set_cwd(datadir(Config)),
ok=erl_tar:extract("ibm.tgz",[compressed]),
ok=erl_tar:extract("japanese.tgz",[compressed]),
ok=erl_tar:extract("oasis.tgz",[compressed]),
ok=erl_tar:extract("sun.tgz",[compressed]),
ok=erl_tar:extract("xmltest.tgz",[compressed]),
ok = change_mode(["ibm","japanese","oasis",
"sun","xmltest"]),
ok = erl_tar:extract("xmlts20130923.tar.gz", [compressed]),
Dirs = ["ibm","japanese","oasis","sun","xmltest"],
[file:rename("xmlconf/" ++ Dir, Dir) || Dir <- Dirs],
[ok = erl_tar:extract(Dir ++ ".tgz", [compressed]) || Dir <- Dirs],
ok = change_mode(Dirs),
[{timetrap,{seconds, 1}}|Config].

end_per_suite(Config) ->
Expand Down
Binary file modified lib/xmerl/test/xmerl_sax_std_SUITE_data/ibm.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_sax_std_SUITE_data/japanese.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_sax_std_SUITE_data/oasis.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_sax_std_SUITE_data/sun.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_sax_std_SUITE_data/xmltest.tgz
Binary file not shown.
Binary file not shown.
18 changes: 9 additions & 9 deletions lib/xmerl/test/xmerl_std_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -753,19 +753,17 @@ suite() ->

init_per_suite(Config) ->
file:set_cwd(datadir(Config)),
ok = erl_tar:extract("ibm.tgz",[compressed]),
ok = erl_tar:extract("japanese.tgz",[compressed]),
ok = erl_tar:extract("oasis.tgz",[compressed]),
ok = erl_tar:extract("sun.tgz",[compressed]),
ok = erl_tar:extract("xmltest.tgz",[compressed]),
ok = change_mode(["ibm","japanese","oasis",
"sun","xmltest"]),
ok = erl_tar:extract("xmlts20130923.tar.gz", [compressed]),
Dirs = ["ibm","japanese","oasis","sun","xmltest"],
[file:rename("xmlconf/" ++ Dir, Dir) || Dir <- Dirs],
[ok = erl_tar:extract(Dir ++ ".tgz", [compressed]) || Dir <- Dirs],
ok = change_mode(Dirs),
Config.

-ifndef(dont_rm_test_dirs).
end_per_suite(Config) ->
file:set_cwd(datadir(Config)),
ok = rm_files(["ibm","japanese","oasis","sun","xmltest"]),
ok = rm_files(["ibm","japanese","oasis","sun","xmltest", "xmlconf"]),
ok.

-else.
Expand Down Expand Up @@ -9953,7 +9951,9 @@ datadir(Config) ->
proplists:get_value(data_dir, Config).

datadir_join(Config,Files) ->
filename:join([datadir(Config)|Files]).
File = filename:join([datadir(Config)|Files]),
ct:log("File: ~ts~n",[File]),
File.


%%add_xml_path(TestCase) ->
Expand Down
Binary file modified lib/xmerl/test/xmerl_std_SUITE_data/ibm.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_std_SUITE_data/japanese.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_std_SUITE_data/oasis.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_std_SUITE_data/sun.tgz
Binary file not shown.
Binary file modified lib/xmerl/test/xmerl_std_SUITE_data/xmltest.tgz
Binary file not shown.
Binary file not shown.

0 comments on commit 58a2976

Please sign in to comment.