Skip to content

Commit

Permalink
Fix a test case bug
Browse files Browse the repository at this point in the history
shell_SUITE: Calling i() did not work because if there are more than
100 processes c:i() will go into pager mode, asking for input.
  • Loading branch information
uabboli committed Mar 18, 2013
1 parent 96acef9 commit a85b205
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/stdlib/test/shell_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ start_restricted_from_shell(Config) when is_list(Config) ->
"test_restricted.erl"),
Contents = <<"-module(test_restricted).
-export([local_allowed/3, non_local_allowed/3]).
local_allowed(i,[],State) ->
local_allowed(m,[],State) ->
{true,State};
local_allowed(ugly,[],_State) ->
non_conforming_reply;
Expand All @@ -146,7 +146,7 @@ start_restricted_from_shell(Config) when is_list(Config) ->
"test_restricted) end.">>),
?line {ok, test_restricted} =
application:get_env(stdlib, restricted_shell),
?line "Pid" ++ _ = t(<<"begin i() end.">>),
?line "Module" ++ _ = t(<<"begin m() end.">>),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err(<<"begin c(foo) end.">>),
?line "exception exit: restricted shell does not allow init:stop()" =
Expand Down Expand Up @@ -199,17 +199,17 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
"-pa "++?config(priv_dir,Config)++
" -stdlib restricted_shell foo"),
?line "Warning! Restricted shell module foo not found: nofile"++_ =
t({Node, <<"begin i() end.">>}),
?line "exception exit: restricted shell does not allow i()" =
comm_err({Node, <<"begin i() end.">>}),
t({Node, <<"begin m() end.">>}),
?line "exception exit: restricted shell does not allow m()" =
comm_err({Node, <<"begin m() end.">>}),
?line [ok] =
(catch scan({Node, <<"begin q() end.">>})),
?line test_server:stop_node(Node),
?line Test = filename:join(?config(priv_dir, Config),
"test_restricted2.erl"),
Contents = <<"-module(test_restricted2).
-export([local_allowed/3, non_local_allowed/3]).
local_allowed(i,[],State) ->
local_allowed(m,[],State) ->
{true,State};
local_allowed(_,_,State) ->
{false,State}.
Expand All @@ -225,7 +225,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
?line {ok,Node2} = start_node(shell_suite_helper_2,
"-pa "++?config(priv_dir,Config)++
" -stdlib restricted_shell test_restricted2"),
?line "Pid" ++ _ = t({Node2,<<"begin i() end.">>}),
?line "Module" ++ _ = t({Node2,<<"begin m() end.">>}),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err({Node2,<<"begin c(foo) end.">>}),
?line "exception exit: restricted shell does not allow init:stop()" =
Expand Down Expand Up @@ -254,7 +254,7 @@ restricted_local(Config) when is_list(Config) ->
"test_restricted_local.erl"),
Contents = <<"-module(test_restricted_local).
-export([local_allowed/3, non_local_allowed/3]).
local_allowed(i,[],State) ->
local_allowed(m,[],State) ->
{true,State};
local_allowed(banan,_,State) ->
{true,State};
Expand Down

0 comments on commit a85b205

Please sign in to comment.