From 2ce1d0963f0c1b4139709802a82df30e2975d199 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 2 Nov 2021 12:10:33 +0200 Subject: Add Extract operation tests for new archive formats Change-Id: I63f80301f452d3d83384fb2c7b3039b43b9d61fe Reviewed-by: Katja Marttila Reviewed-by: Iikka Eklund --- .../installer/extractarchiveoperationtest/data.qrc | 4 ++++ .../xmloperationrepository/A/1.0.0content1.tar.gz | Bin 0 -> 105 bytes .../xmloperationrepository/A/1.0.0content2.tar.bz2 | Bin 0 -> 125 bytes .../xmloperationrepository/A/1.0.0content3.tar.xz | Bin 0 -> 152 bytes .../data/xmloperationrepository/A/1.0.0content4.zip | Bin 0 -> 202 bytes .../data/xmloperationrepository/Updates.xml | 18 +++++++++++++++++- .../tst_extractarchiveoperationtest.cpp | 12 ++++++++++++ 7 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content1.tar.gz create mode 100644 tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content2.tar.bz2 create mode 100644 tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content3.tar.xz create mode 100644 tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content4.zip (limited to 'tests') diff --git a/tests/auto/installer/extractarchiveoperationtest/data.qrc b/tests/auto/installer/extractarchiveoperationtest/data.qrc index d6eb2cf92..974c0c6f7 100644 --- a/tests/auto/installer/extractarchiveoperationtest/data.qrc +++ b/tests/auto/installer/extractarchiveoperationtest/data.qrc @@ -4,6 +4,10 @@ data/invalid.7z data/xmloperationrepository/Updates.xml data/xmloperationrepository/A/1.0.0content.7z + data/xmloperationrepository/A/1.0.0content1.tar.gz + data/xmloperationrepository/A/1.0.0content2.tar.bz2 + data/xmloperationrepository/A/1.0.0content3.tar.xz + data/xmloperationrepository/A/1.0.0content4.zip data/xmloperationrepository/A/1.0.0anothercontent.7z data/xmloperationrepository/A/1.0.0default.7z diff --git a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content1.tar.gz b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content1.tar.gz new file mode 100644 index 000000000..3e494db34 Binary files /dev/null and b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content1.tar.gz differ diff --git a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content2.tar.bz2 b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content2.tar.bz2 new file mode 100644 index 000000000..12cbef8a1 Binary files /dev/null and b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content2.tar.bz2 differ diff --git a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content3.tar.xz b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content3.tar.xz new file mode 100644 index 000000000..bfa825493 Binary files /dev/null and b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content3.tar.xz differ diff --git a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content4.zip b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content4.zip new file mode 100644 index 000000000..866bfa589 Binary files /dev/null and b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/A/1.0.0content4.zip differ diff --git a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/Updates.xml b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/Updates.xml index 3a8bdd018..73a093725 100644 --- a/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/Updates.xml +++ b/tests/auto/installer/extractarchiveoperationtest/data/xmloperationrepository/Updates.xml @@ -8,7 +8,7 @@ 1.0.0 2015-01-01 true - content.7z,anothercontent.7z,default.7z + content.7z,anothercontent.7z,content1.tar.gz,content2.tar.bz2,content3.tar.xz,content4.zip,default.7z @TargetDir@/FolderForContent @@ -18,6 +18,22 @@ @TargetDir@/FolderForAnotherContent anothercontent.7z + + @TargetDir@/FolderForTarGzContent + content1.tar.gz + + + @TargetDir@/FolderForTarBz2Content + content2.tar.bz2 + + + @TargetDir@/FolderForTarXzContent + content3.tar.xz + + + @TargetDir@/FolderForZipContent + content4.zip + @TargetDir@/FolderForDefault diff --git a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp index cbbc1a1c7..14afc6902 100644 --- a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp +++ b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp @@ -100,6 +100,18 @@ private slots: QFile extractedFile(m_testDirectory + QDir::separator() + "FolderForContent/content.txt"); QVERIFY(extractedFile.exists()); + extractedFile.setFileName(m_testDirectory + QDir::separator() + "FolderForTarGzContent/content.txt"); + QVERIFY(extractedFile.exists()); + + extractedFile.setFileName(m_testDirectory + QDir::separator() + "FolderForTarBz2Content/content.txt"); + QVERIFY(extractedFile.exists()); + + extractedFile.setFileName(m_testDirectory + QDir::separator() + "FolderForTarXzContent/content.txt"); + QVERIFY(extractedFile.exists()); + + extractedFile.setFileName(m_testDirectory + QDir::separator() + "FolderForZipContent/content.txt"); + QVERIFY(extractedFile.exists()); + extractedFile.setFileName(m_testDirectory + QDir::separator() + "FolderForAnotherContent/anothercontent.txt"); QVERIFY(extractedFile.exists()); -- cgit v1.2.3