Git: Add auto tests for CloneWizardPage

Change-Id: I6b186731eba56a70ce799f17fdf538bb674a5439
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2014-07-11 23:15:01 +02:00
committed by André Hartmann
parent 1f1eb5e4ba
commit c30856e657
4 changed files with 39 additions and 0 deletions

View File

@@ -1487,6 +1487,8 @@ Gerrit::Internal::GerritPlugin *GitPlugin::gerritPlugin() const
#ifdef WITH_TESTS
#include "clonewizardpage.h"
#include <QTest>
Q_DECLARE_METATYPE(FileStates)
@@ -1602,6 +1604,23 @@ void GitPlugin::testLogResolving()
"50a6b54c - Merge branch 'for-junio' of git://bogomips.org/git-svn",
"3587b513 - Update draft release notes to 1.8.2");
}
void GitPlugin::testCloneWizard_directoryFromRepository()
{
CloneWizardPage page;
page.testDirectoryFromRepository();
}
void GitPlugin::testCloneWizard_directoryFromRepository_data()
{
QTest::addColumn<QString>("repository");
QTest::addColumn<QString>("localDirectory");
QTest::newRow("http") << "http://host/qt/qt.git" << "qt";
QTest::newRow("user@host") << "user@host:qt/qt.git" << "qt";
QTest::newRow("local repo") << "/home/user/qt-creator.git" << "home-user-qt-creator";
QTest::newRow("ssh with port") << "ssh://host:29418/qt/qt.git" << "qt";
}
#endif
Q_EXPORT_PLUGIN(GitPlugin)