Skip to content

Commit

Permalink
add test for foo_SUITE_data files
Browse files Browse the repository at this point in the history
  • Loading branch information
alisdair sullivan committed Dec 21, 2015
1 parent 639906b commit a4711d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/rebar_ct_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,10 @@ suite_at_root(Config) ->
true = filelib:is_file(TestBeam),

DataDir = filename:join([AppDir, "_build", "test", "extras", "root_SUITE_data"]),
true = filelib:is_dir(DataDir).
true = filelib:is_dir(DataDir),

DataFile = filename:join([AppDir, "_build", "test", "extras", "root_SUITE_data", "some_data.txt"]),
true = filelib:is_file(DataFile).

suite_at_app_root(Config) ->
AppDir = ?config(apps, Config),
Expand Down Expand Up @@ -688,7 +691,10 @@ suite_at_app_root(Config) ->
true = filelib:is_file(TestBeam),

DataDir = filename:join([AppDir, "_build", "test", "extras", "apps", Name2, "app_root_SUITE_data"]),
true = filelib:is_dir(DataDir).
true = filelib:is_dir(DataDir),

DataFile = filename:join([AppDir, "_build", "test", "extras", "root_SUITE_data", "some_data.txt"]),
true = filelib:is_file(DataFile).

%% this test probably only fails when this suite is run via rebar3 with the --cover flag
data_dir_correct(Config) ->
Expand Down

0 comments on commit a4711d0

Please sign in to comment.