summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-17 17:22:38 +0200
committerhut <hut@lavabit.com>2011-10-17 17:22:38 +0200
commit9b2de75f3289c7a0281cc48bf55248b0ac174a55 (patch)
treeb32689bb360d4d04d39f4e29c7098cf685101e82 /Makefile
parentcfb9044407481344136f8fa4e3700fe3df7efa4c (diff)
downloadranger-9b2de75f3289c7a0281cc48bf55248b0ac174a55.tar.gz
emit a signal when a directory finishes loading content
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
-05-22 23:59:52 +0100 Rename command sources' href='/danisanti/profani-tty/commit/tests/unittests/test_cmd_statuses.c?id=fb34785566c59e055399d2c5eb8378ea44c8c983'>fb347855 ^
c7325de0 ^
383e601f ^
81190251 ^
383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
c7325de0 ^

383e601f ^
c7325de0 ^
383e601f ^
c7325de0 ^
c7325de0 ^
79e9ab83 ^
383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
79e9ab83 ^



383e601f ^
79e9ab83 ^




79e9ab83 ^

383e601f ^
79e9ab83 ^
383e601f ^
79e9ab83 ^
2af418fd ^
79e9ab83 ^
383e601f ^
79e9ab83 ^
2af418fd ^
79e9ab83 ^
2af418fd ^
79e9ab83 ^
79e9ab83 ^

383e601f ^
79e9ab83 ^
383e601f ^
79e9ab83 ^
2af418fd ^
79e9ab83 ^
383e601f ^
79e9ab83 ^
2af418fd ^



2af418fd ^

383e601f ^
2af418fd ^
383e601f ^
2af418fd ^


383e601f ^
2af418fd ^



79e9ab83 ^
79e9ab83 ^
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182







                   

                               
                  
                       
 
                              
 
                                
 
                                                           
 

                                       
                                                         
 
                                                             
                        

 
                                                                    
 

                                                      
                                                         
 
                                                             
                        

 
                                                                 
 

                                                   
                                                         
 
                                                             
                        

 
                                                                
 

                                                  
                                                         
 
                                                             
                        
 
 
                                                
 



                                                                         
                                                             




                                                            

 
                                                   
 



                                                                                         
                                                             




                                                            

 
                                                 
 



                                                                         
                                                             




                                                            

 
                                             
 



                                                                          
                                                             




                                                         

 
                                                
 



                                                                                          
                                                             




                                                         

 
                                              
 



                                                                          
                                                             




                                                         

 
                                             
 
                                            
 
                                                                               
 
                                                             
 
                                                        
                             
                                        
                        

 
                                                
 
                                               
 
                                                                                           
 
                                                             
 



                                                        

 
                                              
 
                                             


                                                                               
                                                             



                                                        
                        
 
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#include "config/preferences.h"

#include "ui/ui.h"
#include "ui/stub_ui.h"

#include "command/cmd_funcs.h"

#define CMD_PRESENCE "/presence"

void cmd_presence_shows_usage_when_bad_subcmd(void **state)
{
    gchar *args[] = { "badcmd", NULL };

    expect_string(cons_bad_cmd_usage, cmd, CMD_PRESENCE);

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);
    assert_true(result);
}

void cmd_presence_shows_usage_when_bad_console_setting(void **state)
{
    gchar *args[] = { "console", "badsetting", NULL };

    expect_string(cons_bad_cmd_usage, cmd, CMD_PRESENCE);

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);
    assert_true(result);
}

void cmd_presence_shows_usage_when_bad_chat_setting(void **state)
{
    gchar *args[] = { "chat", "badsetting", NULL };

    expect_string(cons_bad_cmd_usage, cmd, CMD_PRESENCE);

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);
    assert_true(result);
}

void cmd_presence_shows_usage_when_bad_muc_setting(void **state)
{
    gchar *args[] = { "muc", "badsetting", NULL };

    expect_string(cons_bad_cmd_usage, cmd, CMD_PRESENCE);

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);
    assert_true(result);
}

void cmd_presence_console_sets_all(void **state)
{
    gchar *args[] = { "console", "all", NULL };

    expect_cons_show("All presence updates will appear in the console.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CONSOLE);
    assert_non_null(setting);
    assert_string_equal("all", setting);
    assert_true(result);
}

void cmd_presence_console_sets_online(void **state)
{
    gchar *args[] = { "console", "online", NULL };

    expect_cons_show("Only online/offline presence updates will appear in the console.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CONSOLE);
    assert_non_null(setting);
    assert_string_equal("online", setting);
    assert_true(result);
}

void cmd_presence_console_sets_none(void **state)
{
    gchar *args[] = { "console", "none", NULL };

    expect_cons_show("Presence updates will not appear in the console.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CONSOLE);
    assert_non_null(setting);
    assert_string_equal("none", setting);
    assert_true(result);
}

void cmd_presence_chat_sets_all(void **state)
{
    gchar *args[] = { "chat", "all", NULL };

    expect_cons_show("All presence updates will appear in chat windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CHAT);
    assert_non_null(setting);
    assert_string_equal("all", setting);
    assert_true(result);
}

void cmd_presence_chat_sets_online(void **state)
{
    gchar *args[] = { "chat", "online", NULL };

    expect_cons_show("Only online/offline presence updates will appear in chat windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CHAT);
    assert_non_null(setting);
    assert_string_equal("online", setting);
    assert_true(result);
}

void cmd_presence_chat_sets_none(void **state)
{
    gchar *args[] = { "chat", "none", NULL };

    expect_cons_show("Presence updates will not appear in chat windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_CHAT);
    assert_non_null(setting);
    assert_string_equal("none", setting);
    assert_true(result);
}

void cmd_presence_room_sets_all(void **state)
{
    gchar *args[] = { "room", "all", NULL };

    expect_cons_show("All presence updates will appear in chat room windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_MUC);
    assert_non_null(setting);
    assert_string_equal("all", setting);
    assert_true(result);
}

void cmd_presence_room_sets_online(void **state)
{
    gchar *args[] = { "room", "online", NULL };

    expect_cons_show("Only join/leave presence updates will appear in chat room windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_MUC);
    assert_non_null(setting);
    assert_string_equal("online", setting);
    assert_true(result);
}

void cmd_presence_room_sets_none(void **state)
{
    gchar *args[] = { "room", "none", NULL };

    expect_cons_show("Presence updates will not appear in chat room windows.");

    gboolean result = cmd_presence(NULL, CMD_PRESENCE, args);

    char *setting = prefs_get_string(PREF_STATUSES_MUC);
    assert_non_null(setting);
    assert_string_equal("none", setting);
    assert_true(result);
}