From b8cdd8c26eb3c57e06dbdc72174642403bf55443 Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Fri, 11 Sep 2026 08:16:59 -0400 Subject: [PATCH] KWSys 2026-09-11 (78cacab5) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 78cacab53201d07143cd3843df56b7708f3a7cc6 (master). Upstream Shortlog ----------------- Tyler Yankee (1): edcc6bbd RegularExpression: Add newline test case --- testRegularExpression.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testRegularExpression.cxx b/testRegularExpression.cxx index afb05aa784..ae6c797e82 100644 --- a/testRegularExpression.cxx +++ b/testRegularExpression.cxx @@ -211,6 +211,12 @@ int testRegularExpression(int, char*[]) // 'o'-'a'. run("charclass.no_escape_invalid_range", ExpectCompile("[\\n-a]", false)); + // By contrast, a literal newline byte '\n' adjacent to '-' forms the + // ascending, valid range '\n'(0x0A)-'a'(0x61). + run("charclass.literal_newline_in_range", ExpectCompile("[\n-a]", true)); + run("charclass.literal_newline_range_match", + ExpectMatch("[\n-a]+", "q\n19abz", "\n19a", 1, 5)); + // Class ranges work over raw byte values, including non-printable // control bytes such as \001 (0x01) through \037 (0x1F). run("charclass.octal_literal_byte_range",