aboutsummaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/test_utilities.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/unittest/test_utilities.cpp b/src/unittest/test_utilities.cpp
index 228a9559f..10ea8d36a 100644
--- a/src/unittest/test_utilities.cpp
+++ b/src/unittest/test_utilities.cpp
@@ -636,8 +636,12 @@ void TestUtilities::testBase64()
void TestUtilities::testSanitizeDirName()
{
- UASSERT(sanitizeDirName("a", "_") == "a");
- UASSERT(sanitizeDirName("COM1", "_") == "_COM1");
- UASSERT(sanitizeDirName("cOm\u00B2 .txt:a", "_") == "cOm\u00B2 _txt_a");
- UASSERT(sanitizeDirName("cOnIn$ ", "_") == "_cOnIn$ ");
+ UASSERT(sanitizeDirName("a", "~") == "a");
+ UASSERT(sanitizeDirName(" ", "~") == "__");
+ UASSERT(sanitizeDirName(" a ", "~") == "_a_");
+ UASSERT(sanitizeDirName("COM1", "~") == "~COM1");
+ UASSERT(sanitizeDirName("COM1", ":") == "_COM1");
+ UASSERT(sanitizeDirName("cOm\u00B2", "~") == "~cOm\u00B2");
+ UASSERT(sanitizeDirName("cOnIn$", "~") == "~cOnIn$");
+ UASSERT(sanitizeDirName(" cOnIn$ ", "~") == "_cOnIn$_");
}