Commit f5c35d31 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

movetest: fix root directory test cases

We are not touching the top-level dir1/ and dir2/ folders, so we need to
remove them from the list of target entries. In the second test case we
also need to fix the destination entry, because we are moving only one
folder and in this case we need to include its name in the destination.

GIT_SILENT
parent c2583382
......@@ -111,7 +111,6 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace a root directory"),
QStringLiteral("test"),
QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir1/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/")),
new Archive::Entry(this, QStringLiteral("dir1/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir1/dir/b.txt")),
......@@ -130,12 +129,11 @@ void MoveTest::testMoving_data()
addAllFormatsRows(QStringLiteral("replace a root directory 2"),
QStringLiteral("test"),
QVector<Archive::Entry*> {
new Archive::Entry(this, QStringLiteral("dir2/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/")),
new Archive::Entry(this, QStringLiteral("dir2/dir/a.txt")),
new Archive::Entry(this, QStringLiteral("dir2/dir/b.txt")),
},
new Archive::Entry(this, QStringLiteral("empty_dir/")),
new Archive::Entry(this, QStringLiteral("empty_dir/dir/")),
QStringList {
QStringLiteral("empty_dir/dir/"),
QStringLiteral("empty_dir/dir/a.txt"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment