diff options
author | Björn Gustavsson <[email protected]> | 2011-09-08 12:11:32 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-09-08 12:25:50 +0200 |
commit | 0f6a66498e789f70ee42e28c0270e74334944fe5 (patch) | |
tree | 46c95a889eef0153cd8399585de23bf238e7b281 /erts/test/autoimport_SUITE.erl | |
parent | a192de2308734a5b2cdb4adc859bdb65da6dfb3e (diff) | |
download | otp-0f6a66498e789f70ee42e28c0270e74334944fe5.tar.gz otp-0f6a66498e789f70ee42e28c0270e74334944fe5.tar.bz2 otp-0f6a66498e789f70ee42e28c0270e74334944fe5.zip |
erts: Fix failing autoimport test case
The autoimport_SUITE:autoimport/1 test case would interpret
data type definitions as function calls. Fix this by skipping
to the <funcs> tag before starting to collect function names.
Diffstat (limited to 'erts/test/autoimport_SUITE.erl')
-rw-r--r-- | erts/test/autoimport_SUITE.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/test/autoimport_SUITE.erl b/erts/test/autoimport_SUITE.erl index 0e4708e046..ca54f375aa 100644 --- a/erts/test/autoimport_SUITE.erl +++ b/erts/test/autoimport_SUITE.erl @@ -87,10 +87,20 @@ 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), 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 -> |