1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-07-03 10:42:28 +00:00

Setup tests

This commit is contained in:
2025-01-10 21:33:48 +01:00
parent 399173b776
commit 46145241fc
23 changed files with 244 additions and 62 deletions

12
tests/unit/tst_git.qml Normal file
View File

@ -0,0 +1,12 @@
import QtQuick 2.9
import QtTest 1.2
import Git 1.0
TestCase {
name: "git"
function test_git_clone() {
verify(Git.clone("",""));
}
}

12
tests/unit/tst_pass.qml Normal file
View File

@ -0,0 +1,12 @@
import QtQuick 2.9
import QtTest 1.2
import Git 1.0
TestCase {
name: "git"
function test_git_clone() {
verify(Git.clone("",""));
}
}

15
tests/unit/tst_utils.qml Normal file
View File

@ -0,0 +1,15 @@
import QtQuick 2.9
import QtTest 1.2
import TestUtils 1.0
import Utils 1.0
TestCase {
name: "utils"
function test_unzip() {
var tempPath = TestUtils.getTempPath() + "/password-store";
var zipUrl = Qt.resolvedUrl("../assets/archive.zip");
var r = Utils.unzip(zipUrl, tempPath)
verify(r, "Unzip return an error %1".arg(zipUrl))
}
}