diff options
author | sluicebox | 2019-02-21 16:36:01 -0800 |
---|---|---|
committer | Filippos Karapetis | 2019-03-03 22:44:29 +0200 |
commit | 85333d805036f423114ce811d701b21d2509ec52 (patch) | |
tree | 3811561106b970bee11c273f5c9df849da0515aa /test/common | |
parent | a3873e7e4bb9022382b97ae9b916aa957f240bdb (diff) | |
download | scummvm-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/common')
-rw-r--r-- | test/common/str.h | 4 |
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***")); } |