From 85333d805036f423114ce811d701b21d2509ec52 Mon Sep 17 00:00:00 2001 From: sluicebox Date: Thu, 21 Feb 2019 16:36:01 -0800 Subject: COMMON: Allow '\#' to match '#' in matchString matchString patterns couldn't be used to find files with the # character as it was only treated as a digit wildcard. SCI expected that to work as it looks for files that start with the # character. --- test/common/str.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/common') diff --git a/test/common/str.h b/test/common/str.h index 783ed53c48..3c69d1792c 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -335,6 +335,10 @@ class StringTestSuite : public CxxTest::TestSuite TS_ASSERT(Common::matchString("monkey.s01", "monkey.s##")); TS_ASSERT(!Common::matchString("monkey.s01", "monkey.###")); + TS_ASSERT(Common::matchString("monkey.s0#", "monkey.s0\\#")); + TS_ASSERT(!Common::matchString("monkey.s0#", "monkey.s0#")); + TS_ASSERT(!Common::matchString("monkey.s01", "monkey.s0\\#")); + TS_ASSERT(!Common::String("").matchString("*_")); TS_ASSERT(Common::String("a").matchString("a***")); } -- cgit v1.2.3