diff options
author | Matthew Hoops | 2011-06-13 13:12:23 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-06-13 13:12:23 -0400 |
commit | d355475a0416897ed254fa85f4d63d0f75d9c7ea (patch) | |
tree | 184892480ebb704b28163c51999e50c414e85f8a /test | |
parent | 224c71e483e09931ba386555ff3b436b9defe63d (diff) | |
parent | bfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (diff) | |
download | scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.gz scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.bz2 scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'test')
-rw-r--r-- | test/common/str.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/common/str.h b/test/common/str.h index 0dee16a493..2c563f3132 100644 --- a/test/common/str.h +++ b/test/common/str.h @@ -284,6 +284,19 @@ class StringTestSuite : public CxxTest::TestSuite TS_ASSERT_EQUALS(Common::normalizePath("foo/./bar", '/'), "foo/bar"); TS_ASSERT_EQUALS(Common::normalizePath("foo//./bar//", '/'), "foo/bar"); TS_ASSERT_EQUALS(Common::normalizePath("foo//.bar//", '/'), "foo/.bar"); + + TS_ASSERT_EQUALS(Common::normalizePath("..", '/'), ".."); + TS_ASSERT_EQUALS(Common::normalizePath("../", '/'), ".."); + TS_ASSERT_EQUALS(Common::normalizePath("/..", '/'), "/.."); + TS_ASSERT_EQUALS(Common::normalizePath("../bar", '/'), "../bar"); + TS_ASSERT_EQUALS(Common::normalizePath("foo//../", '/'), ""); + TS_ASSERT_EQUALS(Common::normalizePath("foo/../bar", '/'), "bar"); + TS_ASSERT_EQUALS(Common::normalizePath("foo//../bar//", '/'), "bar"); + TS_ASSERT_EQUALS(Common::normalizePath("foo//..bar//", '/'), "foo/..bar"); + + TS_ASSERT_EQUALS(Common::normalizePath("foo/../../bar//", '/'), "../bar"); + TS_ASSERT_EQUALS(Common::normalizePath("../foo/../bar", '/'), "../bar"); + TS_ASSERT_EQUALS(Common::normalizePath("../../foo/bar/", '/'), "../../foo/bar"); } void test_matchString() { |