From a9583c541173ba35391973dc07559fc426d6ccbb Mon Sep 17 00:00:00 2001 From: Zack Slayton Date: Tue, 7 Jan 2025 16:09:19 -0500 Subject: [PATCH] Removes skip list for incompletness checking. --- src/lazy/text/buffer.rs | 4 +--- src/lazy/text/raw/sequence.rs | 17 ----------------- tests/detect_incomplete_text.rs | 17 ----------------- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/lazy/text/buffer.rs b/src/lazy/text/buffer.rs index 41de12cb..74a5a51c 100644 --- a/src/lazy/text/buffer.rs +++ b/src/lazy/text/buffer.rs @@ -59,7 +59,7 @@ macro_rules! scalar_value_matchers { impl Debug for TextBuffer<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { const CHARS_TO_SHOW: usize = 64; - write!(f, "Buf {{")?; + write!(f, "TextBuffer {{")?; // Try to read the next several bytes from the buffer as UTF-8... let text_result = std::str::from_utf8(self.data); // ...if it works, print the first 64 Unicode scalars... @@ -738,8 +738,6 @@ impl<'top> TextBuffer<'top> { let ((macro_id, macro_ref, mut arg_expr_cache), matched_input) = parser.with_taken().parse_next(self)?; - // let matched_input = self.slice(0, input.offset() - self.offset()); - let parameters = macro_ref.signature().parameters(); if arg_expr_cache.len() < parameters.len() { // If expressions were not provided for all arguments, it was due to rest syntax. diff --git a/src/lazy/text/raw/sequence.rs b/src/lazy/text/raw/sequence.rs index 07006356..ce35ff4f 100644 --- a/src/lazy/text/raw/sequence.rs +++ b/src/lazy/text/raw/sequence.rs @@ -209,23 +209,6 @@ impl<'data, E: TextEncoding<'data>> Iterator for RawTextSExpIterator<'data, E> { } } } - - // fn next(&mut self) -> Option { - // if self.has_returned_error { - // return None; - // } - // match self.input.match_sexp_item() { - // Ok(Some(value)) => Some(Ok(RawValueExpr::ValueLiteral(LazyRawTextValue::::from( - // value, - // )))), - // Ok(None) => None, - // Err(e) => { - // self.has_returned_error = true; - // e.with_context("reading the next sexp value", self.input) - // .transpose() - // } - // } - // } } impl<'data, E: TextEncoding<'data>> LazyContainerPrivate<'data, E> for RawTextSExp<'data, E> { diff --git a/tests/detect_incomplete_text.rs b/tests/detect_incomplete_text.rs index 56be95e5..ec4d4627 100644 --- a/tests/detect_incomplete_text.rs +++ b/tests/detect_incomplete_text.rs @@ -13,29 +13,12 @@ use test_generator::test_resources; mod ion_tests; -// These tests are all failing because multipart long strings are not handled correctly when the -// "part" boundary happens to also fall on a point where the reader needs to refill the input buffer. -const INCOMPLETE_LONG_STRING_SKIP_LIST: SkipList = &[ - "ion-tests/iontestdata/good/equivs/localSymbolTableAppend.ion", - "ion-tests/iontestdata/good/equivs/localSymbolTableNullSlots.ion", - "ion-tests/iontestdata/good/equivs/longStringsWithComments.ion", - "ion-tests/iontestdata/good/equivs/strings.ion", - "ion-tests/iontestdata/good/lists.ion", - "ion-tests/iontestdata/good/strings.ion", - "ion-tests/iontestdata/good/stringsWithWhitespace.ion", - "ion-tests/iontestdata/good/strings_cr_nl.ion", - "ion-tests/iontestdata/good/strings2.ion", - "ion-tests/iontestdata/good/structs.ion", - "ion-tests/iontestdata/good/strings_nl.ion", -]; - // A copy of the `ELEMENT_GLOBAL_SKIP_LIST` in which each file name has been canonicalized for the // current host machine. This makes it possible to compare names in the list with names of files // on the host without worrying about differences in (for example) path separators. static CANONICAL_FILE_NAMES: LazyLock> = LazyLock::new(|| { ELEMENT_GLOBAL_SKIP_LIST .iter() - .chain(INCOMPLETE_LONG_STRING_SKIP_LIST.iter()) .filter_map(|filename| { // Canonicalize the skip list file names so they're in the host OS' preferred format. // This involves looking up the actual file; if canonicalization fails, the file could