From 18b34a564906c7ef36daefab081b44ebfd9ee64b Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 16 Oct 2020 14:35:18 -0400 Subject: InputSource::unreadCh -- only unread most recently read character This is all that ever worked. The test suite was trying to do something different from ClosedFileInputSource. --- libtests/closed_file_input_source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libtests') diff --git a/libtests/closed_file_input_source.cc b/libtests/closed_file_input_source.cc index 7309ca31..f3e4f2ac 100644 --- a/libtests/closed_file_input_source.cc +++ b/libtests/closed_file_input_source.cc @@ -38,9 +38,9 @@ void do_tests(InputSource* is) is->seek(521, SEEK_SET); is->read(b, 1); #else - is->unreadCh('Q'); + is->unreadCh('\n'); check("read unread character", 1 == is->read(b, 1)); - check("got character", 'Q' == b[0]); + check("got character", '\n' == b[0]); #endif check("last offset after read unread", 521 == is->getLastOffset()); is->seek(0, SEEK_END); -- cgit v1.2.3-70-g09d2