From 82bc78eb4342737a719c30b402b5ce24d1e010e8 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Mon, 15 Jul 2019 17:50:47 +0200 Subject: [PATCH] check that slurp works twice in a row. Fix rexx --- rexx/core.rexx | 2 +- tests/step6_file.mal | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rexx/core.rexx b/rexx/core.rexx index 647317a3..63fe5551 100644 --- a/rexx/core.rexx +++ b/rexx/core.rexx @@ -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) */ diff --git a/tests/step6_file.mal b/tests/step6_file.mal index cf1fd2f2..ec503974 100644 --- a/tests/step6_file.mal +++ b/tests/step6_file.mal @@ -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")