From 7d3b09bb5fdceda875bfcd23fca1640d2acb416f Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 6 Aug 2024 14:34:41 +0800 Subject: [PATCH] Provide Windows-compatible forbidden filename character in forbidden filenames test Signed-off-by: Claudio Cambra --- test/testlocaldiscovery.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/testlocaldiscovery.cpp b/test/testlocaldiscovery.cpp index 7f5f4f0855ecc..147a59bc8257e 100644 --- a/test/testlocaldiscovery.cpp +++ b/test/testlocaldiscovery.cpp @@ -303,7 +303,7 @@ private slots: fakeFolder.syncEngine().account()->setCapabilities({ { "files", QVariantMap { { "forbidden_filenames", QVariantList { ".foo", "bar" } }, - { "forbidden_filename_characters", QVariantList { "\n" } }, + { "forbidden_filename_characters", QVariantList { "_" } }, { "forbidden_filename_basenames", QVariantList { "base" } }, { "forbidden_filename_extensions", QVariantList { "ext" } } } } @@ -314,7 +314,7 @@ private slots: fakeFolder.localModifier().insert("C/moo"); fakeFolder.localModifier().insert("C/.moo"); fakeFolder.localModifier().insert("C/potatopotato.txt"); - fakeFolder.localModifier().insert("C/potato\npotato.txt"); + fakeFolder.localModifier().insert("C/potato_potato.txt"); fakeFolder.localModifier().insert("C/basefilename.txt"); fakeFolder.localModifier().insert("C/base.txt"); fakeFolder.localModifier().insert("C/filename.txt"); @@ -326,12 +326,13 @@ private slots: QVERIFY(!fakeFolder.currentRemoteState().find("C/.foo")); QVERIFY(!fakeFolder.currentRemoteState().find("C/bar")); QVERIFY(fakeFolder.currentRemoteState().find("C/potatopotato.txt")); - QVERIFY(!fakeFolder.currentRemoteState().find("C/potato\npotato.txt")); + QVERIFY(!fakeFolder.currentRemoteState().find("C/potato_potato.txt")); QVERIFY(fakeFolder.currentRemoteState().find("C/basefilename.txt")); QVERIFY(!fakeFolder.currentRemoteState().find("C/base.txt")); QVERIFY(fakeFolder.currentRemoteState().find("C/filename.txt")); QVERIFY(!fakeFolder.currentRemoteState().find("C/filename.ext")); } +#endif void testCreateFileWithTrailingSpaces_localAndRemoteTrimmedDoNotExist_renameAndUploadFile() {