summaryrefslogtreecommitdiffstats
path: root/tdeio/tdefile
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2016-12-21 01:09:27 +0300
committerSlávek Banko <slavek.banko@axis.cz>2017-01-29 02:27:15 +0100
commited74769bfaae171809c0bc1a10a8ba0f6ff8895f (patch)
tree2be1a9e1f24c538b0f682e733794336f6fe54193 /tdeio/tdefile
parentd556a8752c0862aa2d84a105dc8ac41b61ba7824 (diff)
downloadtdelibs-ed74769bfaae171809c0bc1a10a8ba0f6ff8895f.tar.gz
tdelibs-ed74769bfaae171809c0bc1a10a8ba0f6ff8895f.zip
tdeio: add tests
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'tdeio/tdefile')
-rw-r--r--tdeio/tdefile/CMakeLists.txt2
-rw-r--r--tdeio/tdefile/tests/CMakeLists.txt40
-rw-r--r--tdeio/tdefile/tests/kcustommenueditortest.cpp2
-rw-r--r--tdeio/tdefile/tests/kdirselectdialogtest.cpp2
-rw-r--r--tdeio/tdefile/tests/kfstest.cpp2
-rw-r--r--tdeio/tdefile/tests/kicondialogtest.cpp2
-rw-r--r--tdeio/tdefile/tests/kopenwithtest.cpp2
-rw-r--r--tdeio/tdefile/tests/kurlrequestertest.cpp2
-rw-r--r--tdeio/tdefile/tests/tdefilenotifytest.cpp (renamed from tdeio/tdefile/tests/knotifytest.cpp)2
-rw-r--r--tdeio/tdefile/tests/tdefiletreeviewtest.cpp2
10 files changed, 50 insertions, 8 deletions
diff --git a/tdeio/tdefile/CMakeLists.txt b/tdeio/tdefile/CMakeLists.txt
index ed0350999..8952005ed 100644
--- a/tdeio/tdefile/CMakeLists.txt
+++ b/tdeio/tdefile/CMakeLists.txt
@@ -9,6 +9,8 @@
#
#################################################
+add_subdirectory( tests )
+
include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
diff --git a/tdeio/tdefile/tests/CMakeLists.txt b/tdeio/tdefile/tests/CMakeLists.txt
new file mode 100644
index 000000000..4c8c0dcce
--- /dev/null
+++ b/tdeio/tdefile/tests/CMakeLists.txt
@@ -0,0 +1,40 @@
+#################################################
+#
+# (C) 2016 Alexander Golubev
+# fatzer2 (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include_directories(
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/dcop
+ ${CMAKE_BINARY_DIR}/tdecore
+ ${CMAKE_SOURCE_DIR}/tdecore
+ ${CMAKE_SOURCE_DIR}/tdeui
+ ${CMAKE_SOURCE_DIR}/tdeio
+ ${CMAKE_SOURCE_DIR}/tdeio/tdefile
+ ${CMAKE_SOURCE_DIR}/tdeio/tdeio
+ ${CMAKE_BINARY_DIR}/tdeio/tdefile
+)
+
+link_directories(
+ ${TDECORE_LIBRARY_DIRS}
+)
+
+tde_add_check_executable( kurlrequestertest LINK tdeio-shared )
+tde_add_check_executable( kopenwithtest LINK tdeio-shared )
+tde_add_check_executable( kdirselectdialogtest LINK tdeio-shared )
+tde_add_check_executable( kicondialogtest LINK tdeio-shared )
+tde_add_check_executable( kcustommenueditortest LINK tdeio-shared )
+tde_add_check_executable( tdefilenotifytest LINK tdeio-shared )
+
+tde_add_check_executable( tdefiletreeviewtest AUTOMOC LINK tdeio-shared )
+
+tde_add_check_executable( kfstest AUTOMOC
+ SOURCES kfstest.cpp kfdtest.cpp LINK tdeio-shared )
diff --git a/tdeio/tdefile/tests/kcustommenueditortest.cpp b/tdeio/tdefile/tests/kcustommenueditortest.cpp
index 9e2189406..97e906fbe 100644
--- a/tdeio/tdefile/tests/kcustommenueditortest.cpp
+++ b/tdeio/tdefile/tests/kcustommenueditortest.cpp
@@ -6,7 +6,7 @@
int main(int argc, char** argv)
{
TDELocale::setMainCatalogue("tdelibs");
- TDEApplication app(argc, argv, "KCustomMenuEditorTest");
+ TDEApplication app(argc, argv, "KCustomMenuEditorTest", true);
KCustomMenuEditor editor(0);
TDEConfig *cfg = new TDEConfig("kdesktop_custom_menu2");
editor.load(cfg);
diff --git a/tdeio/tdefile/tests/kdirselectdialogtest.cpp b/tdeio/tdefile/tests/kdirselectdialogtest.cpp
index c1178c3bc..71adee9a8 100644
--- a/tdeio/tdefile/tests/kdirselectdialogtest.cpp
+++ b/tdeio/tdefile/tests/kdirselectdialogtest.cpp
@@ -5,7 +5,7 @@
int main( int argc, char **argv )
{
- TDEApplication app(argc, argv, "kdirselectdialogtest");
+ TDEApplication app(argc, argv, "kdirselectdialogtest", true);
KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
if ( u.isValid() )
diff --git a/tdeio/tdefile/tests/kfstest.cpp b/tdeio/tdefile/tests/kfstest.cpp
index ada8d825e..021fdb3a3 100644
--- a/tdeio/tdefile/tests/kfstest.cpp
+++ b/tdeio/tdefile/tests/kfstest.cpp
@@ -44,7 +44,7 @@
int main(int argc, char **argv)
{
- TDEApplication a(argc, argv, "kfstest");
+ TDEApplication a(argc, argv, "kfstest", true);
TQString name1;
TQStringList names;
diff --git a/tdeio/tdefile/tests/kicondialogtest.cpp b/tdeio/tdefile/tests/kicondialogtest.cpp
index 3000e89a0..b516ee07d 100644
--- a/tdeio/tdefile/tests/kicondialogtest.cpp
+++ b/tdeio/tdefile/tests/kicondialogtest.cpp
@@ -3,7 +3,7 @@
int main( int argc, char **argv )
{
- TDEApplication app( argc, argv, "kicondialogtest" );
+ TDEApplication app( argc, argv, "kicondialogtest", true );
// TDEIconDialog::getIcon();
diff --git a/tdeio/tdefile/tests/kopenwithtest.cpp b/tdeio/tdefile/tests/kopenwithtest.cpp
index 925aa7625..fe7ae3986 100644
--- a/tdeio/tdefile/tests/kopenwithtest.cpp
+++ b/tdeio/tdefile/tests/kopenwithtest.cpp
@@ -28,7 +28,7 @@
int main(int argc, char **argv)
{
- TDEApplication app(argc, argv, "kopenwithtest");
+ TDEApplication app(argc, argv, "kopenwithtest", true);
KURL::List list;
list += KURL("file:///tmp/testfile.txt");
diff --git a/tdeio/tdefile/tests/kurlrequestertest.cpp b/tdeio/tdefile/tests/kurlrequestertest.cpp
index 829055304..023603082 100644
--- a/tdeio/tdefile/tests/kurlrequestertest.cpp
+++ b/tdeio/tdefile/tests/kurlrequestertest.cpp
@@ -5,7 +5,7 @@
int main( int argc, char **argv )
{
- TDEApplication app( argc, argv, "kurlrequestertest" );
+ TDEApplication app( argc, argv, "kurlrequestertest", true );
KURL url = KURLRequesterDlg::getURL( "ftp://ftp.kde.org" );
tqDebug( "Selected url: %s", url.url().latin1());
diff --git a/tdeio/tdefile/tests/knotifytest.cpp b/tdeio/tdefile/tests/tdefilenotifytest.cpp
index 1716a86a3..10dd5959d 100644
--- a/tdeio/tdefile/tests/knotifytest.cpp
+++ b/tdeio/tdefile/tests/tdefilenotifytest.cpp
@@ -3,7 +3,7 @@
int main( int argc, char **argv )
{
- TDEApplication app( argc, argv, "knotifytest" );
+ TDEApplication app( argc, argv, "knotifytest", true );
KNotifyDialog *dlg = new KNotifyDialog();
dlg->addApplicationEvents( "twin" );
return dlg->exec();
diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp
index 9ff0199dc..da031eac2 100644
--- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp
+++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp
@@ -134,7 +134,7 @@ void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c )
int main(int argc, char **argv)
{
- TDEApplication a(argc, argv, "tdefiletreeviewtest");
+ TDEApplication a(argc, argv, "tdefiletreeviewtest", true);
TQString name1;
TQStringList names;