| 172 | } |
| 173 | |
| 174 | void TestShellBuddy::testActivation() |
| 175 | { |
| 176 | QCOMPARE(m_documentController->openDocuments().count(), 0); |
| 177 | |
| 178 | enableBuddies(); |
| 179 | enableOpenAfterCurrent(); |
| 180 | |
| 181 | QTemporaryDir dirA; |
| 182 | createFile(dirA, QStringLiteral("a.l.txt")); |
| 183 | createFile(dirA, QStringLiteral("a.r.txt")); |
| 184 | createFile(dirA, QStringLiteral("b.r.txt")); |
| 185 | |
| 186 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.r.txt")); |
| 187 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.l.txt")); |
| 188 | verifyFilename(m_uiController->activeSublimeWindow()->activeView(), "a.l.txt"); |
| 189 | |
| 190 | m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "b.r.txt")); |
| 191 | verifyFilename(m_uiController->activeSublimeWindow()->activeView(), "b.r.txt"); |
| 192 | |
| 193 | QCOMPARE(m_documentController->openDocuments().count(), 3); |
| 194 | for(int i = 0; i < 3; i++) |
| 195 | m_documentController->openDocuments().at(0)->close(IDocument::Discard); |
| 196 | QCOMPARE(m_documentController->openDocuments().count(), 0); |
| 197 | } |
| 198 | |
| 199 | |
| 200 | void TestShellBuddy::testDisableBuddies() |
nothing calls this directly
no test coverage detected