From 82e76bc134d89efcb8c113f2b20ba4bb5612dda1 Mon Sep 17 00:00:00 2001 From: Stepan Koltsov Date: Mon, 30 Sep 2024 00:51:36 +0100 Subject: [PATCH] Repro test non-ASCII text format parsing Cherry-pick from https://github.com/stepancheg/rust-protobuf/pull/730 --- .../src/common/v2/test_fmt_text_format.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-crates/protobuf-codegen-protoc-test/src/common/v2/test_fmt_text_format.rs b/test-crates/protobuf-codegen-protoc-test/src/common/v2/test_fmt_text_format.rs index eb5d8cc83..df034ef1a 100644 --- a/test-crates/protobuf-codegen-protoc-test/src/common/v2/test_fmt_text_format.rs +++ b/test-crates/protobuf-codegen-protoc-test/src/common/v2/test_fmt_text_format.rs @@ -114,6 +114,13 @@ fn test_string_bytes() { ); } +#[test] +fn non_ascii_strings() { + test_text_format_str_descriptor("string_singular: \"À\"", &TestTypes::descriptor()); + // TODO: fix this. + // test_text_format_str_descriptor("string_singular: \"日月\"", &TestTypes::descriptor()); +} + #[test] fn test_message() { test_text_format_str_descriptor("test_message_singular {}", &TestTypes::descriptor());