28 lines
535 B
Elixir
28 lines
535 B
Elixir
|
defmodule LytlangTest do
|
||
|
use ExUnit.Case
|
||
|
doctest Lytlang
|
||
|
|
||
|
test "greets the world" do
|
||
|
assert Lytlang.hello() == :world
|
||
|
end
|
||
|
|
||
|
test "transpiles module" do
|
||
|
input = """
|
||
|
!mod EmptyModule
|
||
|
"""
|
||
|
|
||
|
output = """
|
||
|
defmodule EmptyModule
|
||
|
end
|
||
|
"""
|
||
|
|
||
|
assert Lytlang.transpile_block(input) == output
|
||
|
end
|
||
|
|
||
|
@tag :skip
|
||
|
test "transpiles example tiny module file correctly" do
|
||
|
output = File.read!("./test/fixtures/tiny.exs")
|
||
|
assert Lytlang.transpile_file("./test/fixtures/tiny.lyt") == output
|
||
|
end
|
||
|
end
|