From d201d7f4a6e6058c272fe75bb832dc78a418272f Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 18 Dec 2015 22:04:44 -0500 Subject: A bad template index does not crash; shows warning This should fix #955 The test is implicit as a bad index previously silently crashed rebar3. By adding the bad index to the `new` suite's files, we can show that things keep running. --- .../.rebar3/templates/bad_index/sup.erl.dtl | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl (limited to 'test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl') diff --git a/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl b/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl new file mode 100644 index 0000000..a2e7209 --- /dev/null +++ b/test/rebar_new_SUITE_data/.rebar3/templates/bad_index/sup.erl.dtl @@ -0,0 +1,35 @@ +%%%------------------------------------------------------------------- +%% @doc {{name}} top level supervisor. +%% @end +%%%------------------------------------------------------------------- + +-module({{name}}_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