aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsluicebox2019-02-21 16:36:01 -0800
committerFilippos Karapetis2019-03-03 22:44:29 +0200
commit85333d805036f423114ce811d701b21d2509ec52 (patch)
tree3811561106b970bee11c273f5c9df849da0515aa /test
parenta3873e7e4bb9022382b97ae9b916aa957f240bdb (diff)
downloadscummvm-rg350-85333d805036f423114ce811d701b21d2509ec52.tar.gz
scummvm-rg350-85333d805036f423114ce811d701b21d2509ec52.tar.bz2
scummvm-rg350-85333d805036f423114ce811d701b21d2509ec52.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/common/str.h4
1 files changed, 4 insertions, 0 deletions
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***"));
}