summaryrefslogtreecommitdiff
path: root/tests/unit/core/test-url.cpp
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-07-20 12:13:25 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-20 12:13:25 +0200
commitdb9a8e7bc47f5638e6f6c39a5de601cca79a7f7b (patch)
tree69325326a6e643fc6032bdaff5034d0c3f436a5a /tests/unit/core/test-url.cpp
parent91ce401769b7e3fcdfaf17738c0822d0a1a3729c (diff)
downloadweechat-db9a8e7bc47f5638e6f6c39a5de601cca79a7f7b.zip
tests: add unit tests using CppUTest
The tests can be run only via CMake: 1. build with tests: cmake .. -DENABLE_TESTS=ON 2. make 3. ctest (or ctest -V for verbose output)
Diffstat (limited to 'tests/unit/core/test-url.cpp')
-rw-r--r--tests/unit/core/test-url.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/unit/core/test-url.cpp b/tests/unit/core/test-url.cpp
new file mode 100644
index 000000000..5401af156
--- /dev/null
+++ b/tests/unit/core/test-url.cpp
@@ -0,0 +1,51 @@
+/*
+ * test-url.cpp - test URL functions
+ *
+ * Copyright (C) 2014 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WeeChat is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CppUTest/TestHarness.h"
+
+extern "C"
+{
+#include "../src/core/wee-url.h"
+}
+
+TEST_GROUP(Url)
+{
+};
+
+/*
+ * Tests functions:
+ * weeurl_download
+ */
+
+TEST(Url, Download)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * weeurl_option_add_to_infolist
+ */
+
+TEST(Url, AddToInfolist)
+{
+ /* TODO: write tests */
+}