1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 09:10:48 +03:00

check that slurp works twice in a row. Fix rexx

This commit is contained in:
Nicolas Boulenguez 2019-07-15 17:50:47 +02:00
parent 6fd3a0db02
commit 82bc78eb43
2 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,7 @@ mal_readline: procedure expose values. /* mal_readline(prompt) */
return new_nil()
mal_slurp: procedure expose values. /* mal_read_string(filename) */
file_content = charin(obj_val(arg(1)), , 100000)
file_content = charin(obj_val(arg(1)), 1, 100000)
return new_string(file_content)
mal_lt: procedure expose values. /* mal_lt(a, b) */

View File

@ -25,6 +25,10 @@
(slurp "../tests/test.txt")
;=>"A line of text\n"
;;; Load the same file twice.
(slurp "../tests/test.txt")
;=>"A line of text\n"
;; Testing load-file
(load-file "../tests/inc.mal")