pitrou commented on a change in pull request #7656: URL: https://github.com/apache/arrow/pull/7656#discussion_r451425844
########## File path: cpp/src/arrow/compute/kernels/scalar_string_test.cc ########## @@ -145,8 +145,148 @@ TYPED_TEST(TestStringKernels, Utf8Lower) { CallFunction("utf8_lower", {invalid_input})); } +TYPED_TEST(TestStringKernels, IsAlphaNumericUnicode) { + // U+08BE (utf8: \xE0\xA2\xBE) is undefined, but utf8proc things it is + // UTF8PROC_CATEGORY_LO + this->CheckUnary("string_isalnum_unicode", "[\"ⱭɽⱤoW123\", null, \"Ɑ2\", \"!\", \"\"]", + boolean(), "[true, null, true, false, false]"); +} + +TYPED_TEST(TestStringKernels, IsAlphaUnicode) { + // U+08BE (utf8: \xE0\xA2\xBE) is undefined, but utf8proc things it is + // UTF8PROC_CATEGORY_LO + this->CheckUnary("string_isalpha_unicode", "[\"ⱭɽⱤoW\", null, \"Ɑ2\", \"!\", \"\"]", + boolean(), "[true, null, false, false, false]"); +} + +TYPED_TEST(TestStringKernels, IsAscii) { + this->CheckUnary("binary_isascii", "[\"azAZ~\", null, \"Ɑ\", \"\"]", boolean(), + "[true, null, false, true]"); +} + +TYPED_TEST(TestStringKernels, IsDecimalUnicode) { + // ٣ is arabic 3 (decimal), Ⅳ roman (non-decimal) + this->CheckUnary("string_isdecimal_unicode", + "[\"12\", null, \"٣\", \"Ⅳ\", \"1a\", \"\"]", boolean(), + "[true, null, true, false, false, false]"); +} + +TYPED_TEST(TestStringKernels, IsNumericUnicode) { + // ٣ is arabic 3 (decimal), Ⅳ roman (non-decimal) + this->CheckUnary("string_isnumeric_unicode", + "[\"12\", null, \"٣\", \"Ⅳ\", \"1a\", \"\"]", boolean(), + "[true, null, true, true, false, false]"); +} + +TYPED_TEST(TestStringKernels, IsLowerUnicode) { + // ٣ is arabic 3 (decimal), Φ capital + this->CheckUnary("string_islower_unicode", + "[\"12\", null, \"٣a\", \"٣A\", \"1a\", \"Φ\", \"\"]", boolean(), Review comment: What about e.g. "some text"? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org