| 132 | |
| 133 | |
| 134 | void TestShellBuddy::testDeclarationDefinitionOrder() |
| 135 | { |
| 136 | QCOMPARE(m_documentController->openDocuments().count(), 0); |
| 137 | enableBuddies(); |
| 138 | enableOpenAfterCurrent(); |
| 139 | |
| 140 | QTemporaryDir dirA; |
| 141 | createFile(dirA, QStringLiteral("a.r.txt")); |
| 142 | createFile(dirA, QStringLiteral("b.r.txt")); |
| 143 | createFile(dirA, QStringLiteral("c.r.txt")); |
| 144 | createFile(dirA, QStringLiteral("a.l.txt")); |
| 145 | createFile(dirA, QStringLiteral("b.l.txt")); |
| 146 | createFile(dirA, QStringLiteral("c.l.txt")); |
| 147 | |
| 148 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.r.txt")); |
| 149 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "b.l.txt")); |
| 150 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "c.r.txt")); |
| 151 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "b.r.txt")); |
| 152 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.l.txt")); |
| 153 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "c.l.txt")); |
| 154 | |
| 155 | Sublime::Area *area = m_uiController->activeArea(); |
| 156 | Sublime::AreaIndex* areaIndex = area->indexOf(m_uiController->activeSublimeWindow()->activeView()); |
| 157 | QCOMPARE(m_documentController->openDocuments().count(), 6); |
| 158 | //QCOMPARE(m_uiController->documents().count(), 6); |
| 159 | QCOMPARE(areaIndex->viewCount(), 6); |
| 160 | |
| 161 | qDebug() << qobject_cast<Sublime::UrlDocument*>(areaIndex->viewAt(0)->document())->url(); |
| 162 | verifyFilename(areaIndex->views().value(0), "a.l.txt"); |
| 163 | verifyFilename(areaIndex->views().value(1), "a.r.txt"); |
| 164 | verifyFilename(areaIndex->views().value(2), "b.l.txt"); |
| 165 | verifyFilename(areaIndex->views().value(3), "b.r.txt"); |
| 166 | verifyFilename(areaIndex->views().value(4), "c.l.txt"); |
| 167 | verifyFilename(areaIndex->views().value(5), "c.r.txt"); |
| 168 | |
| 169 | for(int i = 0; i < 6; i++) |
| 170 | m_documentController->openDocuments().at(0)->close(IDocument::Discard); |
| 171 | QCOMPARE(m_documentController->openDocuments().count(), 0); |
| 172 | } |
| 173 | |
| 174 | void TestShellBuddy::testActivation() |
| 175 | { |
nothing calls this directly
no test coverage detected