about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-04-19 14:19:47 +0200
committerJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-05-16 15:57:07 +0200
commit95e06ad16955f3b49c117cc6f2d53bf4da747154 (patch)
tree91738ed4485940d4d9fcb4fcd97caa391db82fda /tests
parent9a68aab01149c9781b899d482eb2c34f2cdf505c (diff)
downloadprofani-tty-95e06ad16955f3b49c117cc6f2d53bf4da747154.tar.gz
Add url support (downloading) to `/plugins install`
Additional changes include code refactoring.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/tools/stub_http_download.c2
-rw-r--r--tests/unittests/tools/stub_plugin_download.c19
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/unittests/tools/stub_http_download.c b/tests/unittests/tools/stub_http_download.c
index f530b384..aff47200 100644
--- a/tests/unittests/tools/stub_http_download.c
+++ b/tests/unittests/tools/stub_http_download.c
@@ -3,6 +3,7 @@
 
 #include <curl/curl.h>
 #include <pthread.h>
+#include "common.h"
 
 typedef struct prof_win_t ProfWin;
 
@@ -17,6 +18,7 @@ typedef struct http_download_t
     ProfWin* window;
     pthread_t worker;
     int cancel;
+    gboolean silent;
 } HTTPDownload;
 
 void*
diff --git a/tests/unittests/tools/stub_plugin_download.c b/tests/unittests/tools/stub_plugin_download.c
new file mode 100644
index 00000000..c54f60d2
--- /dev/null
+++ b/tests/unittests/tools/stub_plugin_download.c
@@ -0,0 +1,19 @@
+#ifndef TOOLS_PLUGIN_DOWNLOAD_H
+#define TOOLS_PLUGIN_DOWNLOAD_H
+
+#include <stdlib.h>
+typedef struct prof_win_t ProfWin;
+typedef struct http_download_t HTTPDownload;
+
+void*
+plugin_download_install(void* userdata)
+{
+    return NULL;
+}
+
+void
+plugin_download_add_download(HTTPDownload* download)
+{
+}
+
+#endif