Arne Goedeke wrote:
Stephen R. van den Berg wrote:
Stdio.FILE in; (in=Stdio.FILE())->assign(Stdio.FakeFile("foo\nbar\n"));
Stdio.File(): not open.
Not sure what you expect it to do. Stdio.File operates on an fd, FakeFile does not have any. I think that assign is meant to be used for Stdio.File subclasses primarily.
Well, I'd like to have a FakeFile() with getchar(), gets() and unread(). So I thought, opening a Stdio.FILE() with a FakeFile() as source should do the trick.