mfm-parser/test/reader_test.exs

18 lines
393 B
Elixir
Raw Normal View History

2022-07-23 17:15:08 +00:00
defmodule MfmParser.ReaderTest do
use ExUnit.Case
alias MfmParser.Reader
test "it can peek at the next character" do
assert Reader.peek("chocolatine") == "c"
2022-07-23 17:15:08 +00:00
end
test "it step to the next character" do
assert Reader.next("chocolatine") == {"c", "hocolatine"}
2022-07-23 17:15:08 +00:00
end
test "it returns eof" do
assert Reader.peek("") == :eof
assert Reader.next("") == :eof
end
end