@@ -252,23 +252,32 @@ end
252252
253253# -------------------------------------------------------------------------------
254254lisp " (import ParserCombinator)"
255- @testset " Import" begin
256- @test lisp " (@E_str \" S\" )" == E " S"
257- end
255+ @test lisp " (@E_str \" S\" )" == E " S"
258256
259257# -------------------------------------------------------------------------------
260- @testset " Bug reports" begin
261- @test lisp """ (def game_map (Dict
262- (=> 'living_room
263- '((you are in the living room
264- of a wizards house - there is a wizard
265- snoring loudly on the couch -)
266- (west door garden)
267- (upstairs stairway attic)))))""" ==
268- Dict (:living_room =>
269- Any[ Any[ :you , :are , :in , :the , :living , :room , :of , :a , :wizards , :house , :- ,
270- :there , :is , :a , :wizard , :snoring , :loudly , :on , :the , :couch , :- ],
271- Any[ :west , :door , :garden ],
272- Any[ :upstairs , :stairway , :attic ] ])
258+ @testset " Include from file" begin
259+ # Return value is value of last expression
260+ @test include_lisp (@__MODULE__ , " lisp.clj" ) == 100
261+ # Test objects defined in lisp.clj
262+ @test func_in_clj_file (1 , 2 ) == " x = 1; y = 2"
263+ @test func_in_clj_file (10 , 20 ) == " x = 10; y = 20"
264+ @test some_global === 1.23f0
265+ @test ! isdefined (@__MODULE__ , :not_a_global )
273266end
274267
268+ # ----------------------------------------------------------------------------------------------------------------------
269+ # Bug reports
270+ # ----------------------------------------------------------------------------------------------------------------------
271+ @test lisp """ (def game_map (Dict
272+ (=> 'living_room
273+ '((you are in the living room
274+ of a wizards house - there is a wizard
275+ snoring loudly on the couch -)
276+ (west door garden)
277+ (upstairs stairway attic)))))""" == Dict (:living_room =>
278+ Any[ Any[ :you , :are , :in , :the , :living , :room , :of , :a , :wizards , :house , :- ,
279+ :there , :is , :a , :wizard , :snoring , :loudly , :on , :the , :couch , :- ],
280+ Any[ :west , :door , :garden ],
281+ Any[ :upstairs , :stairway , :attic ] ])
282+
283+
0 commit comments