diff --git a/lib/srfi/38/test.sld b/lib/srfi/38/test.sld index a1327f2d..6da58482 100644 --- a/lib/srfi/38/test.sld +++ b/lib/srfi/38/test.sld @@ -85,6 +85,13 @@ (test 15.0 (read-from-string "#i#xf")) (test (expt 10 100) (read-from-string "#e1e100")) + (test "A\n\nB\n" (read-from-string "\"A\\n\\ + \\n\\ + B\n\"")) + (test "A\n\n" (read-from-string "\"A\\n\\ + \\n\\ + \"")) + (cond-expand (chicken (test-io "(#0=\"abc\" #0# #0#)" diff --git a/sexp.c b/sexp.c index bbd53a8d..337cf0a8 100644 --- a/sexp.c +++ b/sexp.c @@ -2207,6 +2207,8 @@ sexp sexp_read_string (sexp ctx, sexp in, int sentinel) { if (c=='\n') { sexp_port_line(in)++; do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t'); + sexp_push_char(ctx, c, in); + continue; } } #endif