Added unit test for do_panel_cd() functions.
[midnight-commander.git] / tests / src / filemanager / do_panel_cd_stub_env.c
blobf12f27b892da670a4f6bb03b4f1b3cbdec528872
1 #include "src/subshell.h"
2 #include "src/setup.h"
5 panels_options_t panels_options;
6 struct mc_fhl_struct *mc_filehighlight;
7 int confirm_execute = 0;
8 int auto_save_setup = 0;
9 int free_space = 0;
10 int horizontal_split = 0;
11 int first_panel_size = 0;
12 int default_source_codepage = 0;
13 int menubar_visible = 1;
14 WPanel *current_panel;
15 WInput *cmdline;
16 WMenuBar *the_menubar;
17 const global_keymap_t *panel_map;
18 gboolean command_prompt;
19 int saving_setup;
21 panels_layout_t panels_layout = {
22 .horizontal_split = 0,
23 .vertical_equal = 1,
24 .left_panel_size = 0,
25 .horizontal_equal = 1,
26 .top_panel_size = 0
29 WInput *
30 command_new (int y, int x, int cols)
32 WInput *cmd;
33 const input_colors_t command_colors = {
34 DEFAULT_COLOR,
35 COMMAND_MARK_COLOR,
36 DEFAULT_COLOR,
37 COMMAND_HISTORY_COLOR
40 cmd = input_new (y, x, (int *) command_colors, cols, "", "cmdline",
41 INPUT_COMPLETE_DEFAULT | INPUT_COMPLETE_CD | INPUT_COMPLETE_COMMANDS |
42 INPUT_COMPLETE_SHELL_ESC);
44 /* Add our hooks */
45 cmd->widget.callback = NULL;
47 return cmd;
50 int
51 do_cd (const char *new_dir, enum cd_enum exact)
53 (void) new_dir;
54 (void) exact;
56 return 0;
59 void
60 do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt)
62 (void) vpath;
63 (void) update_prompt;
64 (void) reset_prompt;
67 void
68 shell_execute (const char *command, int flags)
70 (void) command;
71 (void) flags;
74 void
75 panel_load_setup (WPanel * panel, const char *section)
77 (void) panel;
78 (void) section;
81 void
82 panel_save_setup (WPanel * panel, const char *section)
84 (void) panel;
85 (void) section;
88 void
89 free_my_statfs (void)
94 int
95 select_charset (int center_y, int center_x, int current_charset, gboolean seldisplay)
97 (void) center_y;
98 (void) center_x;
99 (void) current_charset;
100 (void) seldisplay;
102 return 0;
105 void
106 update_xterm_title_path (void)
110 void
111 init_my_statfs (void)
114 void
115 my_statfs (struct my_statfs *myfs_stats, const char *path)
117 (void) myfs_stats;
118 (void) path;
121 void
122 clean_dir (dir_list * list, int count)
124 (void) list;
125 (void) count;
129 struct Widget *
130 get_panel_widget (int idx)
132 (void) idx;
134 return NULL;
139 do_load_dir (const char *path, dir_list * list, sortfn * sort, gboolean reverse,
140 gboolean case_sensitive, gboolean exec_ff, const char *fltr)
142 (void) path;
143 (void) list;
144 (void) sort;
145 (void) reverse;
146 (void) case_sensitive;
147 (void) exec_ff;
148 (void) fltr;
150 return 0;
154 do_reload_dir (const vfs_path_t * vpath, dir_list * list, sortfn * sort, int count,
155 gboolean reverse, gboolean case_sensitive, gboolean exec_ff, const char *fltr)
157 (void) vpath;
158 (void) list;
159 (void) sort;
160 (void) count;
161 (void) reverse;
162 (void) case_sensitive;
163 (void) exec_ff;
164 (void) fltr;
166 return 0;
170 void
171 do_sort (dir_list * list, sortfn * sort, int top, gboolean reverse,
172 gboolean case_sensitive, gboolean exec_ff)
174 (void) list;
175 (void) sort;
176 (void) top;
177 (void) reverse;
178 (void) case_sensitive;
179 (void) exec_ff;
183 regex_command (const char *filename, const char *action, int *move_dir)
185 (void) filename;
186 (void) action;
187 (void) move_dir;
189 return 0;
192 gboolean
193 if_link_is_exe (const char *full_name, const file_entry * file)
195 (void) full_name;
196 (void) file;
198 return TRUE;
201 void
202 change_panel (void)
206 gboolean
207 set_zero_dir (dir_list * list)
209 (void) list;
211 return TRUE;
214 void
215 load_hint (gboolean force)
217 (void) force;
220 panel_view_mode_t
221 get_display_type (int idx)
223 (void) idx;
224 return view_listing;
227 panel_view_mode_t
228 get_current_type (void)
230 return view_listing;
233 panel_view_mode_t
234 get_other_type (void)
236 return view_listing;
240 get_current_index (void)
242 return 0;
246 get_other_index (void)
248 return 1;
252 unsorted (file_entry * a, file_entry * b)
254 (void) a;
255 (void) b;
257 return 0;
261 sort_name (file_entry * a, file_entry * b)
263 (void) a;
264 (void) b;
266 return 0;
270 sort_vers (file_entry * a, file_entry * b)
272 (void) a;
273 (void) b;
275 return 0;
279 sort_ext (file_entry * a, file_entry * b)
281 (void) a;
282 (void) b;
284 return 0;
288 sort_time (file_entry * a, file_entry * b)
290 (void) a;
291 (void) b;
293 return 0;
297 sort_atime (file_entry * a, file_entry * b)
299 (void) a;
300 (void) b;
302 return 0;
306 sort_ctime (file_entry * a, file_entry * b)
308 (void) a;
309 (void) b;
311 return 0;
315 sort_size (file_entry * a, file_entry * b)
317 (void) a;
318 (void) b;
320 return 0;
324 sort_inode (file_entry * a, file_entry * b)
326 (void) a;
327 (void) b;
329 return 0;
332 void
333 set_display_type (int num, panel_view_mode_t type)
335 (void) num;
336 (void) type;
339 void
340 copy_cmd_local (void)
344 void
345 delete_cmd_local (void)
349 void
350 view_raw_cmd (void)
354 void
355 edit_cmd_new (void)
359 void
360 rename_cmd_local (void)
364 void
365 select_invert_cmd (void)
369 void
370 unselect_cmd (void)
374 void
375 select_cmd (void)
379 struct WPanel *
380 get_other_panel (void)
382 return NULL;
385 const panel_field_t *
386 sort_box (panel_sort_info_t * info)
388 (void) info;
390 return NULL;
393 void
394 midnight_set_buttonbar (WButtonBar * b)
396 (void) b;