From d0ffbb60e654d39b6e22dc2be1693d9d676c997f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 16 Jan 2014 00:15:21 +0100 Subject: Use equivalence instead of strict equality for path components. --- tests/utility/pathTest.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/utility/pathTest.cpp') 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; -- cgit v1.2.3