Current section
Files
Jump to
Current section
Files
src/stdin_test.erl
-module(stdin_test).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([main/0]).
-spec main() -> binary().
main() ->
_assert_subject = begin
_pipe = stdin:stdin(),
gleam@iterator:step(_pipe)
end,
{next, Line1, _} = case _assert_subject of
{next, _, _} -> _assert_subject;
_assert_fail ->
erlang:error(#{gleam_error => let_assert,
message => <<"Assertion pattern match failed"/utf8>>,
value => _assert_fail,
module => <<"stdin_test"/utf8>>,
function => <<"main"/utf8>>,
line => 6})
end,
gleam@io:debug(Line1),
_assert_subject@1 = begin
_pipe@1 = stdin:stdin(),
gleam@iterator:step(_pipe@1)
end,
{next, Line2, _} = case _assert_subject@1 of
{next, _, _} -> _assert_subject@1;
_assert_fail@1 ->
erlang:error(#{gleam_error => let_assert,
message => <<"Assertion pattern match failed"/utf8>>,
value => _assert_fail@1,
module => <<"stdin_test"/utf8>>,
function => <<"main"/utf8>>,
line => 11})
end,
gleam@io:debug(Line2).