| File tests/commands/misc_fops.c changed (mode: 100644) (index b414e5b82..20c91a6f5) |
| ... |
... |
TEST(non_zero_count_is_handled) |
| 359 |
359 |
regs_reset(); |
regs_reset(); |
| 360 |
360 |
} |
} |
| 361 |
361 |
|
|
|
362 |
|
TEST(delete, REPEAT(2)) |
|
363 |
|
{ |
|
364 |
|
const int in_bg = (STIC_TEST_PARAM == 1); |
|
365 |
|
|
|
366 |
|
create_file(SANDBOX_PATH "/file"); |
|
367 |
|
|
|
368 |
|
make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), SANDBOX_PATH, "", cwd); |
|
369 |
|
populate_dir_list(&lwin, /*reload=*/0); |
|
370 |
|
assert_string_equal("file", lwin.dir_entry[lwin.list_pos].name); |
|
371 |
|
|
|
372 |
|
ui_sb_msg(""); |
|
373 |
|
if(in_bg) |
|
374 |
|
{ |
|
375 |
|
assert_success(cmds_dispatch1("delete &", &lwin, CIT_COMMAND)); |
|
376 |
|
wait_for_bg(); |
|
377 |
|
assert_string_equal("", ui_sb_last()); |
|
378 |
|
} |
|
379 |
|
else |
|
380 |
|
{ |
|
381 |
|
assert_failure(cmds_dispatch1("delete", &lwin, CIT_COMMAND)); |
|
382 |
|
assert_string_equal("1 item Deleted", ui_sb_last()); |
|
383 |
|
} |
|
384 |
|
|
|
385 |
|
no_remove_file(SANDBOX_PATH "/file"); |
|
386 |
|
} |
|
387 |
|
|
| 362 |
388 |
static OpsResult |
static OpsResult |
| 363 |
389 |
exec_func(OPS op, void *data, const char *src, const char *dst) |
exec_func(OPS op, void *data, const char *src, const char *dst) |
| 364 |
390 |
{ |
{ |