diff options
author | Anthony Ramine <[email protected]> | 2013-04-26 20:35:32 +0200 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2013-04-26 23:35:40 +0200 |
commit | 897ae234ef868c17116b683052ee46effd60c3d2 (patch) | |
tree | 691bd988194a13a233fd16e59c654aecb6b85496 /lib/stdlib/test/epp_SUITE.erl | |
parent | 7e9ae3007fd3c44a05a746628983faff401dfd0c (diff) | |
download | otp-897ae234ef868c17116b683052ee46effd60c3d2.tar.gz otp-897ae234ef868c17116b683052ee46effd60c3d2.tar.bz2 otp-897ae234ef868c17116b683052ee46effd60c3d2.zip |
Fix an inconsistent state in epp
When entering a new file, epp doesn't properly set #epp.name2 like it
does on initialisation, generating a malformed file attribute when it
leaves the file.
Diffstat (limited to 'lib/stdlib/test/epp_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/epp_SUITE.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl index b2f1aa955a..0cbdf76270 100644 --- a/lib/stdlib/test/epp_SUITE.erl +++ b/lib/stdlib/test/epp_SUITE.erl @@ -104,6 +104,8 @@ include_local(suite) -> include_local(Config) when is_list(Config) -> ?line DataDir = ?config(data_dir, Config), ?line File = filename:join(DataDir, "include_local.erl"), + FooHrl = filename:join([DataDir,"include","foo.hrl"]), + BarHrl = filename:join([DataDir,"include","bar.hrl"]), %% include_local.erl includes include/foo.hrl which %% includes bar.hrl (also in include/) without requiring %% any additional include path, and overriding any file @@ -111,6 +113,8 @@ include_local(Config) when is_list(Config) -> ?line {ok, List} = epp:parse_file(File, [DataDir], []), ?line {value, {attribute,_,a,{true,true}}} = lists:keysearch(a,3,List), + [{File,1},{FooHrl,1},{BarHrl,1},{FooHrl,5},{File,5}] = + [ FileLine || {attribute,_,file,FileLine} <- List ], ok. %%% Here is a little reimplementation of epp:parse_file, which times out |