Index: test/cctest/parsing/test-scanner-streams.cc |
diff --git a/test/cctest/parsing/test-scanner-streams.cc b/test/cctest/parsing/test-scanner-streams.cc |
index 8d84dc8f06cd6224589e4c4f80f85f1a58ce6be3..b4b28f1fc5b67cc07e9f6e29720cd7567a272a07 100644 |
--- a/test/cctest/parsing/test-scanner-streams.cc |
+++ b/test/cctest/parsing/test-scanner-streams.cc |
@@ -132,6 +132,13 @@ TEST(Utf8StreamBOM) { |
stream->Seek(5); |
CHECK_EQ(unicode_ucs2[5], stream->Advance()); |
+ |
+ // Try again, but make sure we have to seek 'backwards'. |
+ while (v8::internal::Utf16CharacterStream::kEndOfInput != stream->Advance()) { |
+ // Do nothing. We merely advance the stream to the end of its input. |
+ } |
+ stream->Seek(5); |
+ CHECK_EQ(unicode_ucs2[5], stream->Advance()); |
} |
TEST(Utf8SplitBOM) { |