diff options
author | Björn Gustavsson <[email protected]> | 2011-09-10 07:42:06 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-09-10 07:42:06 +0200 |
commit | 8802241a20aaa3fb1e101f087812aa8db92a1ea7 (patch) | |
tree | 3228d1c0cfec35ea737543856d937698ef33045b /erts/test | |
parent | 262a9af33d3ceb4cb032c434b100cea7d4b0d60e (diff) | |
parent | 83e81e574d6a85655936e2a68025f81fbb12a0a1 (diff) | |
download | otp-8802241a20aaa3fb1e101f087812aa8db92a1ea7.tar.gz otp-8802241a20aaa3fb1e101f087812aa8db92a1ea7.tar.bz2 otp-8802241a20aaa3fb1e101f087812aa8db92a1ea7.zip |
Merge branch 'bjorn/erts/fix-autoimports-testcase' into dev
* bjorn/erts/fix-autoimports-testcase:
erts: Add a sanity check to autoimport_SUITE
erts: Fix failing autoimport test case
Diffstat (limited to 'erts/test')
-rw-r--r-- | erts/test/autoimport_SUITE.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/test/autoimport_SUITE.erl b/erts/test/autoimport_SUITE.erl index 0e4708e046..71ed5204b1 100644 --- a/erts/test/autoimport_SUITE.erl +++ b/erts/test/autoimport_SUITE.erl @@ -87,10 +87,21 @@ autoimports(Config) when is_list(Config) -> xml(XMLFile) -> {ok,File} = file:open(XMLFile,[read]), + xskip_to_funcs(file:read_line(File),File), DocData = xloop(file:read_line(File),File), + true = DocData =/= [], file:close(File), analyze(DocData). +%% Skip lines up to and including the <funcs> tag. +xskip_to_funcs({ok,Line},File) -> + case re:run(Line,"\\<funcs\\>",[{capture,none}]) of + nomatch -> + xskip_to_funcs(file:read_line(File),File); + match -> + ok + end. + xloop({ok,Line},File) -> case re:run(Line,"\\<name\\>",[{capture,none}]) of nomatch -> |