Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ end

#-------------------------------------------------------------------------------
lisp"(import ParserCombinator)"
@test lisp"(@E_str \"S\")" == E"S"
@testset "Module import" begin
@test lisp"(@E_str \"S\")" == E"S"
end

#-------------------------------------------------------------------------------
@testset "Include from file" begin
Expand All @@ -265,19 +267,19 @@ lisp"(import ParserCombinator)"
@test !isdefined(@__MODULE__, :not_a_global)
end

# ----------------------------------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Bug reports
# ----------------------------------------------------------------------------------------------------------------------
@test lisp"""(def game_map (Dict
(=> 'living_room
'((you are in the living room
of a wizards house - there is a wizard
snoring loudly on the couch -)
(west door garden)
(upstairs stairway attic)))))""" == Dict(:living_room =>
Any[ Any[ :you, :are, :in, :the, :living, :room, :of, :a, :wizards, :house, :-,
:there, :is, :a, :wizard, :snoring, :loudly, :on, :the, :couch, :- ],
Any[ :west, :door, :garden ],
Any[ :upstairs, :stairway, :attic ] ])


@testset "Bug reports" begin
@test lisp"""(def game_map (Dict
(=> 'living_room
'((you are in the living room
of a wizards house - there is a wizard
snoring loudly on the couch -)
(west door garden)
(upstairs stairway attic)))))""" ==
Dict(:living_room =>
Any[ Any[ :you, :are, :in, :the, :living, :room, :of, :a, :wizards, :house, :-,
:there, :is, :a, :wizard, :snoring, :loudly, :on, :the, :couch, :- ],
Any[ :west, :door, :garden ],
Any[ :upstairs, :stairway, :attic ] ])
end