aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-05 12:54:34 +0100
committerHans Bolinder <[email protected]>2018-01-05 16:37:42 +0100
commit36b19c153fba7c41ab1da9c9e8bc6e685da1fd95 (patch)
treefbd03b5ac9c21c472c67da73e12f886f6477dd87 /lib/stdlib
parentde0771a4b3d882161f10c1d2d03c8027327f9323 (diff)
downloadotp-36b19c153fba7c41ab1da9c9e8bc6e685da1fd95.tar.gz
otp-36b19c153fba7c41ab1da9c9e8bc6e685da1fd95.tar.bz2
otp-36b19c153fba7c41ab1da9c9e8bc6e685da1fd95.zip
stdlib: Correct a filelib test case
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 261acb70ad..afaf2404fa 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -536,16 +536,18 @@ find_source(Config) when is_list(Config) ->
[{".erl",".yrl",[{"",""}]}]),
{ok, ParserErl} = filelib:find_source(code:which(core_parse)),
+ ParserErlName = filename:basename(ParserErl),
+ ParserErlDir = filename:dirname(ParserErl),
{ok, ParserYrl} = filelib:find_source(ParserErl),
"lry." ++ _ = lists:reverse(ParserYrl),
- {ok, ParserYrl} = filelib:find_source(ParserErl,
+ {ok, ParserYrl} = filelib:find_source(ParserErlName, ParserErlDir,
[{".beam",".erl",[{"ebin","src"}]},
{".erl",".yrl",[{"",""}]}]),
%% find_source automatically checks the local directory regardless of rules
{ok, ParserYrl} = filelib:find_source(ParserErl),
- {ok, ParserYrl} = filelib:find_source(ParserErl,
- [{".beam",".erl",[{"ebin","src"}]}]),
+ {ok, ParserYrl} = filelib:find_source(ParserErlName, ParserErlDir,
+ [{".erl",".yrl",[{"ebin","src"}]}]),
%% find_file does not check the local directory unless in the rules
ParserYrlName = filename:basename(ParserYrl),