Added calling estap_file module in bin/estap.
[erlang-estap.git] / bin / estap
1 #!/usr/bin/escript
2 %%
3 %%----------------------------------------------------------------------------
4
5 main([]) -> main(["--help"]);
6 main(["-h"]) -> main(["--help"]);
7 main(["--help"]) ->
8   io:fwrite("Usage: ~s filename~n", [escript:script_name()]);
9
10 main([File]) ->
11   {ok, {Module, Forms}} = estap_file:read_file(File, []),
12   {ok, {Plan, Tests}} = estap_file:load_code(Forms),
13   io:fwrite("plan: ~p~ntests: ~p~n", [Plan, Tests]).
14
15 %%----------------------------------------------------------------------------
16 %% vim:ft=erlang