Added calling estap_file module in bin/estap.
[erlang-estap.git] / bin / estap
index 115f7cb..83485b4 100755 (executable)
--- a/bin/estap
+++ b/bin/estap
@@ -8,7 +8,9 @@ main(["--help"]) ->
   io:fwrite("Usage: ~s filename~n", [escript:script_name()]);
 
 main([File]) ->
-  'TODO'.
+  {ok, {Module, Forms}} = estap_file:read_file(File, []),
+  {ok, {Plan, Tests}} = estap_file:load_code(Forms),
+  io:fwrite("plan: ~p~ntests: ~p~n", [Plan, Tests]).
 
 %%----------------------------------------------------------------------------
 %% vim:ft=erlang