about summary refs log tree commit diff stats
path: root/tests/test_cmd_bookmark.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-02-01 16:16:56 +0000
committerJames Booth <boothj5@gmail.com>2014-02-01 16:16:56 +0000
commit652e99fdd8dcd42e75cbacde89aecbe903a368e2 (patch)
tree62b75fa781db4a31dffc95d832f13804cc5a1cdc /tests/test_cmd_bookmark.c
parent23842e5254f91ebecac37ceea6a28a240accae24 (diff)
downloadprofani-tty-652e99fdd8dcd42e75cbacde89aecbe903a368e2.tar.gz
Added cmd_bookmark tests
Diffstat (limited to 'tests/test_cmd_bookmark.c')
-rw-r--r--tests/test_cmd_bookmark.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test_cmd_bookmark.c b/tests/test_cmd_bookmark.c
new file mode 100644
index 00000000..59f5c02e
--- /dev/null
+++ b/tests/test_cmd_bookmark.c
@@ -0,0 +1,30 @@
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include "xmpp/xmpp.h"
+#include "xmpp/mock_xmpp.h"
+
+#include "command/commands.h"
+
+#include "ui/mock_ui.h"
+
+void cmd_bookmark_shows_usage_when_no_args(void **state)
+{
+    mock_cons_show();
+    CommandHelp *help = malloc(sizeof(CommandHelp));
+    help->usage = "some usage";
+    gchar *args[] = { NULL };
+
+    mock_connection_status(JABBER_CONNECTED);
+    expect_cons_show("Usage: some usage");
+
+    gboolean result = cmd_bookmark(args, *help);
+    assert_true(result);
+
+    free(help);
+}
:06 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2015-05-12 08:47:06 -0700 1354' href='/akkartik/mu/commit/002test.cc?h=main&id=54e4548dd1695c94f580302b637fe427be995c2a'>54e4548d ^
51530916 ^

2ed1aa9c ^
51530916 ^

de49fb42 ^


b39ceb27 ^
df0b469f ^
b39ceb27 ^






51530916 ^
b39ceb27 ^
9e608a77 ^

ac0e9db5 ^
6c1376f8 ^
9e608a77 ^

b39ceb27 ^
5a9e3a11 ^
683d53ca ^
b39ceb27 ^


683d53ca ^

b39ceb27 ^
df0b469f ^
ccd792da ^
51530916 ^
ac0e9db5 ^
7d13531e ^



eb3a527a ^


b5ab709c ^
fb4836dc ^
b5ab709c ^
51530916 ^

0f125d5f ^
ad6eb923 ^


86acd630 ^

b24eb476 ^
eb3a527a ^
65ccad4c ^
b24eb476 ^
40be2522 ^
eb3a527a ^



37537bf3 ^









51530916 ^
385ff136 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111