diff options
-rw-r--r-- | tests/testgitstorage.cpp | 9 | ||||
-rw-r--r-- | tests/testgitstorage.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/testgitstorage.cpp b/tests/testgitstorage.cpp index 1fd2ffcba..080ba49c3 100644 --- a/tests/testgitstorage.cpp +++ b/tests/testgitstorage.cpp @@ -59,13 +59,20 @@ void TestGitStorage::testSetup() QCOMPARE(localCacheDirectory.removeRecursively(), true); } +void TestGitStorage::testGitStorageLocal_data() +{ + // test different path we may encounter (since storage depends on user name) + QTest::addColumn<QString>("testDirName"); + QTest::newRow("ASCII path") << "./gittest"; +} + void TestGitStorage::testGitStorageLocal() { // test writing and reading back from local git storage git_repository *repo; git_libgit2_init(); QCOMPARE(parse_file(SUBSURFACE_TEST_DATA "/dives/SampleDivesV2.ssrf"), 0); - QString testDirName("./gittest"); + QFETCH(QString, testDirName); QDir testDir(testDirName); QCOMPARE(testDir.removeRecursively(), true); QCOMPARE(QDir().mkdir(testDirName), true); diff --git a/tests/testgitstorage.h b/tests/testgitstorage.h index ef1dacd9e..e71e1f809 100644 --- a/tests/testgitstorage.h +++ b/tests/testgitstorage.h @@ -8,6 +8,7 @@ class TestGitStorage : public QObject Q_OBJECT private slots: void testSetup(); + void testGitStorageLocal_data(); void testGitStorageLocal(); void testGitStorageCloud(); void testGitStorageCloudOfflineSync(); |