File tests/misc/args.c changed (mode: 100644) (index 6644acfa5..5dc8f2e29) |
13 |
13 |
|
|
14 |
14 |
#include "utils.h" |
#include "utils.h" |
15 |
15 |
|
|
|
16 |
|
static int with_remote_cmds(void); |
|
17 |
|
|
16 |
18 |
static char *saved_cwd; |
static char *saved_cwd; |
17 |
19 |
|
|
18 |
20 |
SETUP() |
SETUP() |
|
... |
... |
TEST(select_accepts_dash_if_such_directory_exists) |
99 |
101 |
args_free(&args); |
args_free(&args); |
100 |
102 |
} |
} |
101 |
103 |
|
|
102 |
|
TEST(remote_allows_no_arguments) |
|
|
104 |
|
TEST(remote_allows_no_arguments, IF(with_remote_cmds)) |
103 |
105 |
{ |
{ |
104 |
106 |
args_t args = { }; |
args_t args = { }; |
105 |
107 |
char *argv[] = { "vifm", "a", "--remote", NULL }; |
char *argv[] = { "vifm", "a", "--remote", NULL }; |
|
... |
... |
TEST(remote_allows_no_arguments) |
109 |
111 |
args_free(&args); |
args_free(&args); |
110 |
112 |
} |
} |
111 |
113 |
|
|
112 |
|
TEST(remote_takes_all_arguments_to_the_right) |
|
|
114 |
|
TEST(remote_takes_all_arguments_to_the_right, IF(with_remote_cmds)) |
113 |
115 |
{ |
{ |
114 |
116 |
args_t args = { }; |
args_t args = { }; |
115 |
117 |
char *argv[] = { "vifm", "a", "--remote", "b", "c", NULL }; |
char *argv[] = { "vifm", "a", "--remote", "b", "c", NULL }; |
|
... |
... |
TEST(remote_takes_all_arguments_to_the_right) |
123 |
125 |
args_free(&args); |
args_free(&args); |
124 |
126 |
} |
} |
125 |
127 |
|
|
126 |
|
TEST(remote_expr_is_parsed) |
|
|
128 |
|
TEST(remote_expr_is_parsed, IF(with_remote_cmds)) |
127 |
129 |
{ |
{ |
128 |
130 |
args_t args = { }; |
args_t args = { }; |
129 |
131 |
char *argv[] = { "vifm", "--remote-expr", "expr", NULL }; |
char *argv[] = { "vifm", "--remote-expr", "expr", NULL }; |
|
... |
... |
TEST(remote_expr_is_parsed) |
133 |
135 |
args_free(&args); |
args_free(&args); |
134 |
136 |
} |
} |
135 |
137 |
|
|
|
138 |
|
static int |
|
139 |
|
with_remote_cmds(void) |
|
140 |
|
{ |
|
141 |
|
#ifdef ENABLE_REMOTE_CMDS |
|
142 |
|
return 1; |
|
143 |
|
#else |
|
144 |
|
return 0; |
|
145 |
|
#endif |
|
146 |
|
} |
|
147 |
|
|
136 |
148 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
137 |
149 |
/* vim: set cinoptions+=t0 filetype=c : */ |
/* vim: set cinoptions+=t0 filetype=c : */ |