From dfedb09fd8228c8cfd5912353d52146e0fd3ffb3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 18 Dec 2018 12:08:34 +0100 Subject: [PATCH] Move test for issue #1329 from t1.pl to new test system --- test/testsyncdelete.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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)