restore opened file and position
This commit is contained in:
12 files changed
+491
-11
No files matched your search
@@ -88,6 +88,27 @@ private slots:
|
||||
// After completion, loading should be false
|
||||
QVERIFY(!ctrl.loading());
|
||||
}
|
||||
|
||||
void currentFilePathInitiallyEmpty()
|
||||
{
|
||||
BookController ctrl;
|
||||
QVERIFY(ctrl.currentFilePath().isEmpty());
|
||||
}
|
||||
|
||||
void currentFilePathSetOnOpen()
|
||||
{
|
||||
BookController ctrl;
|
||||
ctrl.openBook(QUrl::fromLocalFile(fixturePath("sample.txt")));
|
||||
QCOMPARE(ctrl.currentFilePath(), fixturePath("sample.txt"));
|
||||
}
|
||||
|
||||
void currentFilePathClearedOnClose()
|
||||
{
|
||||
BookController ctrl;
|
||||
ctrl.openBook(QUrl::fromLocalFile(fixturePath("sample.txt")));
|
||||
ctrl.closeBook();
|
||||
QVERIFY(ctrl.currentFilePath().isEmpty());
|
||||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(BookControllerTest)
|
||||
|
||||
Reference in new issue
Block a user