From 33e4c8a079aab17454ed9caad0cb6fd9b1fa92b1 Mon Sep 17 00:00:00 2001 From: Tino Breddin Date: Tue, 16 Apr 2019 11:52:47 +0200 Subject: Fix duplicate module naming in edoc test suite data --- .../bad/apps/bad_bar2/src/bad_bar2.app.src | 16 ++++++++++ .../bad/apps/bad_bar2/src/bad_bar2.erl | 12 ++++++++ .../bad/apps/bad_bar2/src/bad_bar2_app.erl | 26 ++++++++++++++++ .../bad/apps/bad_bar2/src/bad_bar2_sup.erl | 35 ++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl create mode 100644 test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl (limited to 'test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src') diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src new file mode 100644 index 0000000..bb147ce --- /dev/null +++ b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.app.src @@ -0,0 +1,16 @@ +{application, bad_bar2, + [{description, "An OTP application"}, + {vsn, "0.1.0"}, + {registered, []}, + {mod, { bad_bar2_app, []}}, + {applications, + [kernel, + stdlib + ]}, + {env,[]}, + {modules, []}, + + {maintainers, []}, + {licenses, []}, + {links, []} + ]}. diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl new file mode 100644 index 0000000..be60adc --- /dev/null +++ b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2.erl @@ -0,0 +1,12 @@ +%% @doc one docline is fine +%% @doc a second docline causes a failure +%% @doc if not, then a & causes a bad ref error. +-module(bad_bar2). +-export([bar2/0]). +-export_type([barer2/0]). + +-type barer2() :: string(). + +% @doc Bar2 bars the bar2. +-spec bar2() -> barer2(). +bar2() -> "Barer2". diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl new file mode 100644 index 0000000..85cd4f5 --- /dev/null +++ b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_app.erl @@ -0,0 +1,26 @@ +%%%------------------------------------------------------------------- +%% @doc bar2 public API +%% @end +%%%------------------------------------------------------------------- + +-module(bad_bar2_app). + +-behaviour(application). + +%% Application callbacks +-export([start/2, stop/1]). + +%%==================================================================== +%% API +%%==================================================================== + +start(_StartType, _StartArgs) -> + bad_bar2_sup:start_link(). + +%%-------------------------------------------------------------------- +stop(_State) -> + ok. + +%%==================================================================== +%% Internal functions +%%==================================================================== diff --git a/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl new file mode 100644 index 0000000..7dbe0cb --- /dev/null +++ b/test/rebar_edoc_SUITE_data/bad/apps/bad_bar2/src/bad_bar2_sup.erl @@ -0,0 +1,35 @@ +%%%------------------------------------------------------------------- +%% @doc bar2 top level supervisor. +%% @end +%%%------------------------------------------------------------------- + +-module(bad_bar2_sup). + +-behaviour(supervisor). + +%% API +-export([start_link/0]). + +%% Supervisor callbacks +-export([init/1]). + +-define(SERVER, ?MODULE). + +%%==================================================================== +%% API functions +%%==================================================================== + +start_link() -> + supervisor:start_link({local, ?SERVER}, ?MODULE, []). + +%%==================================================================== +%% Supervisor callbacks +%%==================================================================== + +%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules} +init([]) -> + {ok, { {one_for_all, 0, 1}, []} }. + +%%==================================================================== +%% Internal functions +%%==================================================================== -- cgit v1.1