This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 9c94861887 test(arrow-schema): assert ParseError for invalid quoted
escapes (#12230)
9c94861887 is described below
commit 9c9486188744e80ec86c3b2bcdd649b89945ffe5
Author: Suraj <[email protected]>
AuthorDate: Fri Nov 13 07:55:58 2026 +0000
test(arrow-schema): assert ParseError for invalid quoted escapes (#12230)
> [!IMPORTANT]
>
> Before opening this PR, [enable CI in your
fork](https://github.com/apache/arrow-rs/blob/main/CONTRIBUTING.md#pull-requests-from-forks).
>
> **Delete this notice after enabling CI.**
# Which issue does this PR close?
- Closes #12221
Part of #11931 follow-up.
# Rationale for this change
The malformed quoted-escape regression tests added in #11931 only
verified that
tokenization returned an error. That allows an unrelated `ArrowError`
variant to
satisfy the test.
# What changes are included in this PR?
- Update `test_invalid_quoted_escapes` in
`arrow-schema/src/datatype_parse.rs`
- Assert each malformed quoted-escape case returns
`ArrowError::ParseError`
specifically, instead of accepting any error
---
arrow-schema/src/datatype_parse.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arrow-schema/src/datatype_parse.rs
b/arrow-schema/src/datatype_parse.rs
index 69e9e50581..851d2475ba 100644
--- a/arrow-schema/src/datatype_parse.rs
+++ b/arrow-schema/src/datatype_parse.rs
@@ -1124,7 +1124,10 @@ mod test {
r#""\u1234""#,
r#""\u{1234""#,
] {
- assert!(Tokenizer::new(input).next().unwrap().is_err(), "{input}");
+ assert!(matches!(
+ Tokenizer::new(input).next().unwrap(),
+ Err(ArrowError::ParseError(_))
+ ));
}
}