From: Olivier Goffart Date: Tue, 18 Dec 2018 11:08:34 +0000 (+0100) Subject: Move test for issue #1329 from t1.pl to new test system X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~360 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dfedb09fd8228c8cfd5912353d52146e0fd3ffb3;p=nextcloud-desktop.git Move test for issue #1329 from t1.pl to new test system --- diff --git a/test/testsyncdelete.cpp b/test/testsyncdelete.cpp index d167274d3..c2633ba4b 100644 --- a/test/testsyncdelete.cpp +++ b/test/testsyncdelete.cpp @@ -41,6 +41,22 @@ private slots: QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); } + + void issue1329() + { + FakeFolder fakeFolder{ FileInfo::A12_B12_C12_S12() }; + + fakeFolder.localModifier().remove("B"); + QVERIFY(fakeFolder.syncOnce()); + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + + // Add a directory that was just removed in the previous sync: + fakeFolder.localModifier().mkdir("B"); + fakeFolder.localModifier().insert("B/b1"); + QVERIFY(fakeFolder.syncOnce()); + QVERIFY(fakeFolder.currentRemoteState().find("B/b1")); + QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState()); + } }; QTEST_GUILESS_MAIN(TestSyncDelete)