Commit 4d16d099 authored by Mark Evenson's avatar Mark Evenson Committed by GitHub

Merge pull request #125 from easye/easye/read-suppress

Easye/read suppress
parents 61405ab8 62f94bc8
......@@ -515,6 +515,7 @@ public class Stream extends StructureObject {
return error(new StreamError(this, e));
}
}
if (!eofError && result == eofValue) return result;
if (Symbol.READ_SUPPRESS.symbolValue(thread) != NIL)
return NIL;
else
......@@ -855,7 +856,7 @@ public class Stream extends StructureObject {
StringBuilder sb = new StringBuilder();
try
{
while (true) {
while (true) {
int ch = _readChar();
if (ch < 0)
break;
......@@ -876,13 +877,13 @@ public class Stream extends StructureObject {
this));
}
}
}
}
}
catch (java.io.IOException e)
{
error(new ReaderError("IO error: ",
this));
return NIL;
error(new ReaderError("IO error: ",
this));
return NIL;
}
if (suppress)
......@@ -2666,19 +2667,19 @@ public class Stream extends StructureObject {
};
public InputStream getWrappedInputStream() {
return in;
return in;
}
public OutputStream getWrappedOutputStream() {
return out;
return out;
}
public Writer getWrappedWriter() {
return writer;
return writer;
}
public PushbackReader getWrappedReader() {
return reader;
return reader;
}
}
(in-package :cl-user)
(prove:plan 1)
;;; Test for <https://github.com/armedbear/abcl/commit/dbba85a710ecc1baaafda38e820cf7fce40b05e5>
(prove:is
(let ((*read-suppress* t))
(with-input-from-string (s "")
(read s nil :eof)))
:eof
"Testing CL:READ when *READ-SUPPRESS* is t")
(prove:finalize)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment