=== source code for shell_SUITE:progex_funs/1
=== Test case started with:
shell_SUITE:progex_funs([{watchdog,<0.7643.6>},
{tc_logfile,"/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00/tests.stdlib_test.logs/run.2014-01-03_17.51.25/shell_suite.progex_funs.html"},
{tc_group_properties,[{name,progex}]},
{tc_group_path,[]},
{data_dir,"/home/pi/R16B03/otp-support/release/tests/stdlib_test/shell_SUITE_data/"},
{priv_dir,"/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00/tests.stdlib_test.logs/run.2014-01-03_17.51.25/log_private/"},
{nodenames,[]}])
=== Current directory is "/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00"
=== Started at 2014-01-03 20:21:08
*** Testing Double = fun(X) -> 2 * X end,
[2,4,6,8,10] = lists:map(Double, [1,2,3,4,5]),
Big = fun(X) -> if X > 10 -> true; true -> false end end,
false = lists:any(Big, [1,2,3,4]),
true = lists:any(Big, [1,2,3,12,5]),
false = lists:all(Big, [1,2,3,4,12,6]),
true = lists:all(Big, [12,13,14,15]),
L = ["I","like","Erlang"],
11 = lists:foldl(fun(X, Sum) -> length(X) + Sum end, 0, L),
Upcase = fun(X) when $a =< X, X =< $z -> X + $A - $a;
(X) -> X
end,
Upcase_word = fun(X) -> lists:map(Upcase, X) end,
"ERLANG" = Upcase_word("Erlang"),
["I","LIKE","ERLANG"] = lists:map(Upcase_word, L),
{["I","LIKE","ERLANG"],11} =
lists:mapfoldl(fun(Word, Sum) ->
{Upcase_word(Word), Sum + length(Word)}
end, 0, L),
[500,12,45] = lists:filter(Big, [500,12,2,45,6,7]),
[200,500,45] = lists:takewhile(Big, [200,500,45,5,3,45,6]),
[5,3,45,6] = lists:dropwhile(Big, [200,500,45,5,3,45,6]),
{[200,500,45],[5,3,45,6]} =
lists:splitwith(Big, [200,500,45,5,3,45,6]),
%% {true,45} = lists:first(Big, [1,2,45,6,123]),
%% false = lists:first(Big, [1,2,4,5]),
Adder = fun(X) -> fun(Y) -> X + Y end end,
Add6 = Adder(6),
16 = Add6(10),
ok.
=== Ended at 2014-01-03 20:21:08
=== successfully completed test case
=== returned value = ok
Test run history
| Top level test index