summaryrefslogtreecommitdiff
path: root/test/minibuffer.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-05-22 00:00:29 +0200
committerAlbert Cervin <albert@acervin.com>2024-09-12 20:17:56 +0200
commit405da5f84b072ea97b69359454899f45d92d24b6 (patch)
tree20525b4bc44a5d8cbab4d62abe8413e174731db6 /test/minibuffer.c
parent4ab7e453e26afc6e9f4938c65f89463fbba9e267 (diff)
downloaddged-405da5f84b072ea97b69359454899f45d92d24b6.tar.gz
dged-405da5f84b072ea97b69359454899f45d92d24b6.tar.xz
dged-405da5f84b072ea97b69359454899f45d92d24b6.zip
WIP LSP client
This contains the start of an LSP client. Nothing (except starting the LSP server) works at the moment and the feature is disabled by default.
Diffstat (limited to 'test/minibuffer.c')
-rw-r--r--test/minibuffer.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/minibuffer.c b/test/minibuffer.c
index 28ee277..b4f8c05 100644
--- a/test/minibuffer.c
+++ b/test/minibuffer.c
@@ -19,7 +19,7 @@ static struct frame_allocator *g_alloc = NULL;
void *alloc_fn(size_t sz) { return frame_allocator_alloc(g_alloc, sz); }
-void init() {
+void init(void) {
if (b.name == NULL) {
settings_init(10);
timers_init();
@@ -31,7 +31,7 @@ void init() {
windows_init(100, 100, &b, &b, &bufs);
}
-void destroy() {
+void destroy(void) {
if (b.name != NULL) {
buffer_destroy(&b);
buffers_destroy(&bufs);
@@ -41,7 +41,7 @@ void destroy() {
}
}
-void test_minibuffer_echo() {
+void test_minibuffer_echo(void) {
struct buffer_view view = buffer_view_create(&b, false, false);
// TODO: how to clear this?
@@ -84,9 +84,15 @@ void test_minibuffer_echo() {
destroy();
}
-int32_t fake(struct command_ctx ctx, int argc, const char *argv[]) { return 0; }
+int32_t fake(struct command_ctx ctx, int argc, const char *argv[]) {
+ (void)ctx;
+ (void)argc;
+ (void)argv;
-void test_minibuffer_prompt() {
+ return 0;
+}
+
+void test_minibuffer_prompt(void) {
init();
ASSERT(!minibuffer_focused(),
"Minibuffer should not be focused without reason");
@@ -111,7 +117,7 @@ void test_minibuffer_prompt() {
destroy();
}
-void run_minibuffer_tests() {
+void run_minibuffer_tests(void) {
run_test(test_minibuffer_echo);
run_test(test_minibuffer_prompt);
}