mfm-parser/test/reader_test.exs
Ilja 45519a3c2a Make parser work for single token input
We can handle all needed tokens.
We still need to test for multiple tokens and for nesting.
2022-07-24 07:55:55 +02:00

18 lines
393 B
Elixir

defmodule MfmParser.ReaderTest do
use ExUnit.Case
alias MfmParser.Reader
test "it can peek at the next character" do
assert Reader.peek("chocolatine") == "c"
end
test "it step to the next character" do
assert Reader.next("chocolatine") == {"c", "hocolatine"}
end
test "it returns eof" do
assert Reader.peek("") == :eof
assert Reader.next("") == :eof
end
end