aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utility/pathTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2014-01-15 23:15:21 +0000
committerVincent Richard <[email protected]>2014-01-15 23:15:21 +0000
commitd0ffbb60e654d39b6e22dc2be1693d9d676c997f (patch)
tree8003bcecb529cbe0f82ccd3a1dfc78a0f1b5f73c /tests/utility/pathTest.cpp
parentReset line length after encoding a hard line break in QP encoding. (diff)
downloadvmime-d0ffbb60e654d39b6e22dc2be1693d9d676c997f.tar.gz
vmime-d0ffbb60e654d39b6e22dc2be1693d9d676c997f.zip
Use equivalence instead of strict equality for path components.
Diffstat (limited to 'tests/utility/pathTest.cpp')
-rw-r--r--tests/utility/pathTest.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/utility/pathTest.cpp b/tests/utility/pathTest.cpp
index 93215586..d0c1c091 100644
--- a/tests/utility/pathTest.cpp
+++ b/tests/utility/pathTest.cpp
@@ -26,7 +26,7 @@
#include "vmime/utility/path.hpp"
-VMIME_TEST_SUITE_BEGIN(pathTest)
+VMIME_TEST_SUITE_BEGIN(utilityPathTest)
VMIME_TEST_LIST_BEGIN
VMIME_TEST(testConstruct1)
@@ -50,6 +50,7 @@ VMIME_TEST_SUITE_BEGIN(pathTest)
VMIME_TEST(testIsDirectParentOf)
VMIME_TEST(testIsParentOf)
+ VMIME_TEST(testIsParentOf_EquivalentCharset)
VMIME_TEST(testRenameParent)
VMIME_TEST_LIST_END
@@ -271,6 +272,19 @@ VMIME_TEST_SUITE_BEGIN(pathTest)
VASSERT_EQ("4", false, p2.isParentOf(p1));
}
+ void testIsParentOf_EquivalentCharset()
+ {
+ path p1;
+ p1.appendComponent(comp("foo", "us-ascii"));
+
+ path p2;
+ p2.appendComponent(comp("foo", "utf-8"));
+ p2.appendComponent(comp("bar"));
+ p2.appendComponent(comp("baz"));
+
+ VASSERT_EQ("1", true, p1.isParentOf(p2));
+ }
+
void testRenameParent()
{
path p1;