Add format output for test print (#2076)
* Add formatted output for the test print
This commit is contained in:
parent
10e5210581
commit
e949e8cbd8
|
@ -17,16 +17,17 @@
|
||||||
-export([print/1, print/2, usage/1, usage/2]).
|
-export([print/1, print/2, usage/1, usage/2]).
|
||||||
|
|
||||||
print(Msg) ->
|
print(Msg) ->
|
||||||
io:format(Msg).
|
io:format(Msg), lists:flatten(io_lib:format("~p", [Msg])).
|
||||||
|
|
||||||
print(Format, Args) ->
|
print(Format, Args) ->
|
||||||
io:format(Format, Args).
|
io:format(Format, Args), lists:flatten(io_lib:format(Format, Args)).
|
||||||
|
|
||||||
usage(CmdList) ->
|
usage(CmdList) ->
|
||||||
lists:foreach(
|
lists:map(
|
||||||
fun({Cmd, Descr}) ->
|
fun({Cmd, Descr}) ->
|
||||||
io:format("~-48s# ~s~n", [Cmd, Descr])
|
io:format("~-48s# ~s~n", [Cmd, Descr]),
|
||||||
|
lists:flatten(io_lib:format("~-48s# ~s~n", [Cmd, Descr]))
|
||||||
end, CmdList).
|
end, CmdList).
|
||||||
|
|
||||||
usage(Format, Args) ->
|
usage(Format, Args) ->
|
||||||
usage([{Format, Args}]).
|
usage([{Format, Args}]).
|
||||||
|
|
Loading…
Reference in New Issue