File indexing completed on 2024-05-12 05:52:03

0001 /*
0002     SPDX-FileCopyrightText: 2021 Waqar Ahmed <waqar.17a@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 #include <QTemporaryFile>
0011 
0012 class KateApp;
0013 class KateViewSpace;
0014 class KateViewManager;
0015 
0016 class LocationHistoryTest : public QObject
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     LocationHistoryTest(QObject *parent = nullptr);
0022     ~LocationHistoryTest() override;
0023 
0024     KateViewSpace *viewSpace();
0025     KateViewManager *viewManager();
0026 
0027 private Q_SLOTS:
0028     void init();
0029     void cleanup();
0030 
0031     void test_addLocationInvalidUrl();
0032     void test_addLocation();
0033     void test_addMaxLocations();
0034     void test_goBackForward();
0035     void test_goBackForward2();
0036     void test_addOnlyIfViewLineCountAwayFromCurrentPos();
0037     void test_signalEmission();
0038 
0039 private:
0040     class QTemporaryDir *m_tempdir;
0041     KateApp *app;
0042     QTemporaryFile tempFile;
0043 };