File src/fops_misc.c changed (mode: 100644) (index 72098469b..234c38f86) |
... |
... |
fops_yank(view_t *view, int reg) |
472 |
472 |
|
|
473 |
473 |
regs_update_unnamed(reg); |
regs_update_unnamed(reg); |
474 |
474 |
|
|
475 |
|
ui_sb_msgf("%d file%s yanked", nyanked_files, |
|
|
475 |
|
ui_sb_msgf("%d item%s yanked", nyanked_files, |
476 |
476 |
(nyanked_files == 1) ? "" : "s"); |
(nyanked_files == 1) ? "" : "s"); |
477 |
477 |
|
|
478 |
478 |
regs_sync_to_shared_memory(); |
regs_sync_to_shared_memory(); |
|
... |
... |
fops_clone(view_t *view, char *list[], int nlines, int force, int copies) |
892 |
892 |
free_string_array(list, nlines); |
free_string_array(list, nlines); |
893 |
893 |
} |
} |
894 |
894 |
|
|
895 |
|
ui_sb_msgf("%d file%s cloned%s", ops->succeeded, |
|
|
895 |
|
ui_sb_msgf("%d item%s cloned%s", ops->succeeded, |
896 |
896 |
(ops->succeeded == 1) ? "" : "s", fops_get_cancellation_suffix()); |
(ops->succeeded == 1) ? "" : "s", fops_get_cancellation_suffix()); |
897 |
897 |
|
|
898 |
898 |
fops_free_ops(ops); |
fops_free_ops(ops); |
|
... |
... |
fops_mkfiles(view_t *view, int at, char *names[], int count) |
1129 |
1129 |
go_to_first_file(view, names, count); |
go_to_first_file(view, names, count); |
1130 |
1130 |
} |
} |
1131 |
1131 |
|
|
1132 |
|
ui_sb_msgf("%d file%s created%s", n, (n == 1) ? "" : "s", |
|
|
1132 |
|
ui_sb_msgf("%d item%s created%s", n, (n == 1) ? "" : "s", |
1133 |
1133 |
fops_get_cancellation_suffix()); |
fops_get_cancellation_suffix()); |
1134 |
1134 |
|
|
1135 |
1135 |
fops_free_ops(ops); |
fops_free_ops(ops); |
|
... |
... |
fops_chown(int u, int g, uid_t uid, gid_t gid) |
1444 |
1444 |
} |
} |
1445 |
1445 |
un_group_close(); |
un_group_close(); |
1446 |
1446 |
|
|
1447 |
|
ui_sb_msgf("%d file%s fully processed%s", ops->succeeded, |
|
|
1447 |
|
ui_sb_msgf("%d item%s fully processed%s", ops->succeeded, |
1448 |
1448 |
(ops->succeeded == 1) ? "" : "s", fops_get_cancellation_suffix()); |
(ops->succeeded == 1) ? "" : "s", fops_get_cancellation_suffix()); |
1449 |
1449 |
fops_free_ops(ops); |
fops_free_ops(ops); |
1450 |
1450 |
|
|
File src/fops_rename.c changed (mode: 100644) (index a2328bab1..f141710a6) |
... |
... |
fops_rename(view_t *view, char *list[], int nlines, int recursive) |
216 |
216 |
const int renamed = perform_renaming(view, files, is_dup, nfiles, list); |
const int renamed = perform_renaming(view, files, is_dup, nfiles, list); |
217 |
217 |
if(renamed >= 0) |
if(renamed >= 0) |
218 |
218 |
{ |
{ |
219 |
|
ui_sb_msgf("%d file%s renamed", renamed, (renamed == 1) ? "" : "s"); |
|
|
219 |
|
ui_sb_msgf("%d item%s renamed", renamed, (renamed == 1) ? "" : "s"); |
220 |
220 |
} |
} |
221 |
221 |
|
|
222 |
222 |
flist_sel_stash(view); |
flist_sel_stash(view); |
|
... |
... |
verify_list(char *files[], int nfiles, char *names[], int nnames, char **error, |
290 |
290 |
const char *suffix = (moves == 1 ? "" : "s"); |
const char *suffix = (moves == 1 ? "" : "s"); |
291 |
291 |
/* Stray space prevents removal of the line. */ |
/* Stray space prevents removal of the line. */ |
292 |
292 |
if(!prompt_msgf("Rename", |
if(!prompt_msgf("Rename", |
293 |
|
"It appears that the rename list has %d file move%s, which could " |
|
294 |
|
"have happened by mistake." |
|
|
293 |
|
"It appears that the rename list has %d move%s, which could have " |
|
294 |
|
"happened by mistake." |
295 |
295 |
"\n \n" |
"\n \n" |
296 |
296 |
"Perform the move%s?", |
"Perform the move%s?", |
297 |
297 |
moves, suffix, suffix)) |
moves, suffix, suffix)) |
|
... |
... |
fops_incdec(view_t *view, int k) |
586 |
586 |
} |
} |
587 |
587 |
else if(err == 0) |
else if(err == 0) |
588 |
588 |
{ |
{ |
589 |
|
ui_sb_msgf("%d file%s renamed", nrenamed, (nrenamed == 1) ? "" : "s"); |
|
|
589 |
|
ui_sb_msgf("%d item%s renamed", nrenamed, (nrenamed == 1) ? "" : "s"); |
590 |
590 |
} |
} |
591 |
591 |
|
|
592 |
592 |
return 1; |
return 1; |
|
... |
... |
rename_marked(view_t *view, const char desc[], const char lhs[], |
944 |
944 |
ui_view_schedule_redraw(view); |
ui_view_schedule_redraw(view); |
945 |
945 |
} |
} |
946 |
946 |
|
|
947 |
|
ui_sb_msgf("%d file%s renamed", nrenamed, (nrenamed == 1) ? "" : "s"); |
|
|
947 |
|
ui_sb_msgf("%d item%s renamed", nrenamed, (nrenamed == 1) ? "" : "s"); |
948 |
948 |
return 1; |
return 1; |
949 |
949 |
} |
} |
950 |
950 |
|
|
File tests/commands/cpmv.c changed (mode: 100644) (index 4a0e2e734..38e9daceb) |
... |
... |
TEST(copy_can_skip_existing_files) |
87 |
87 |
{ |
{ |
88 |
88 |
ui_sb_msg(""); |
ui_sb_msg(""); |
89 |
89 |
assert_failure(cmds_dispatch("%copy -skip", &lwin, CIT_COMMAND)); |
assert_failure(cmds_dispatch("%copy -skip", &lwin, CIT_COMMAND)); |
90 |
|
assert_string_equal("2 files successfully processed", ui_sb_last()); |
|
|
90 |
|
assert_string_equal("2 items successfully processed", ui_sb_last()); |
91 |
91 |
|
|
92 |
92 |
assert_int_equal(2, get_file_size(SANDBOX_PATH "/right/a")); |
assert_int_equal(2, get_file_size(SANDBOX_PATH "/right/a")); |
93 |
93 |
remove_file(SANDBOX_PATH "/right/b"); |
remove_file(SANDBOX_PATH "/right/b"); |
|
... |
... |
TEST(link_can_skip_existing_files, IF(not_windows)) |
97 |
97 |
{ |
{ |
98 |
98 |
ui_sb_msg(""); |
ui_sb_msg(""); |
99 |
99 |
assert_failure(cmds_dispatch("%alink -skip", &lwin, CIT_COMMAND)); |
assert_failure(cmds_dispatch("%alink -skip", &lwin, CIT_COMMAND)); |
100 |
|
assert_string_equal("2 files successfully processed", ui_sb_last()); |
|
|
100 |
|
assert_string_equal("2 items successfully processed", ui_sb_last()); |
101 |
101 |
|
|
102 |
102 |
assert_int_equal(2, get_file_size(SANDBOX_PATH "/right/a")); |
assert_int_equal(2, get_file_size(SANDBOX_PATH "/right/a")); |
103 |
103 |
remove_file(SANDBOX_PATH "/right/b"); |
remove_file(SANDBOX_PATH "/right/b"); |
|
... |
... |
TEST(file_name_can_start_with_a_dash) |
107 |
107 |
{ |
{ |
108 |
108 |
ui_sb_msg(""); |
ui_sb_msg(""); |
109 |
109 |
assert_failure(cmds_dispatch("%copy -- -test -skip", &lwin, CIT_COMMAND)); |
assert_failure(cmds_dispatch("%copy -- -test -skip", &lwin, CIT_COMMAND)); |
110 |
|
assert_string_equal("2 files successfully processed", ui_sb_last()); |
|
|
110 |
|
assert_string_equal("2 items successfully processed", ui_sb_last()); |
111 |
111 |
|
|
112 |
112 |
remove_file(SANDBOX_PATH "/right/-test"); |
remove_file(SANDBOX_PATH "/right/-test"); |
113 |
113 |
remove_file(SANDBOX_PATH "/right/-skip"); |
remove_file(SANDBOX_PATH "/right/-skip"); |
File tests/fileops/rename_files.c changed (mode: 100644) (index b806f3211..eef8a1aeb) |
... |
... |
TEST(rename_can_move_files) |
354 |
354 |
|
|
355 |
355 |
ui_sb_msg(""); |
ui_sb_msg(""); |
356 |
356 |
(void)fops_rename(&lwin, names, /*nlines=*/1, /*recursive=*/0); |
(void)fops_rename(&lwin, names, /*nlines=*/1, /*recursive=*/0); |
357 |
|
assert_string_equal("1 file renamed", ui_sb_last()); |
|
|
357 |
|
assert_string_equal("1 item renamed", ui_sb_last()); |
358 |
358 |
|
|
359 |
359 |
restore_cwd(saved_cwd); |
restore_cwd(saved_cwd); |
360 |
360 |
saved_cwd = save_cwd(); |
saved_cwd = save_cwd(); |
|
... |
... |
TEST(case_change_works, IF(on_case_sensitive_fs)) |
422 |
422 |
|
|
423 |
423 |
ui_sb_msg(""); |
ui_sb_msg(""); |
424 |
424 |
(void)fops_case(&lwin, /*to_upper=*/0); |
(void)fops_case(&lwin, /*to_upper=*/0); |
425 |
|
assert_string_equal("2 files renamed", ui_sb_last()); |
|
|
425 |
|
assert_string_equal("2 items renamed", ui_sb_last()); |
426 |
426 |
|
|
427 |
427 |
assert_failure(unlink(SANDBOX_PATH "/fIlE1")); |
assert_failure(unlink(SANDBOX_PATH "/fIlE1")); |
428 |
428 |
assert_failure(unlink(SANDBOX_PATH "/FiLe2")); |
assert_failure(unlink(SANDBOX_PATH "/FiLe2")); |
|
... |
... |
TEST(substitution_and_idential_names_in_different_dirs) |
466 |
466 |
|
|
467 |
467 |
ui_sb_msg(""); |
ui_sb_msg(""); |
468 |
468 |
(void)fops_subst(&lwin, "$", "d", /*ic=*/0, /*glob=*/0); |
(void)fops_subst(&lwin, "$", "d", /*ic=*/0, /*glob=*/0); |
469 |
|
assert_string_equal("2 files renamed", ui_sb_last()); |
|
|
469 |
|
assert_string_equal("2 items renamed", ui_sb_last()); |
470 |
470 |
|
|
471 |
471 |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
472 |
472 |
assert_success(unlink(SANDBOX_PATH "/adir/abcd")); |
assert_success(unlink(SANDBOX_PATH "/adir/abcd")); |
|
... |
... |
TEST(translation_and_idential_names_in_different_dirs) |
494 |
494 |
|
|
495 |
495 |
ui_sb_msg(""); |
ui_sb_msg(""); |
496 |
496 |
(void)fops_tr(&lwin, "abc", "xyz"); |
(void)fops_tr(&lwin, "abc", "xyz"); |
497 |
|
assert_string_equal("2 files renamed", ui_sb_last()); |
|
|
497 |
|
assert_string_equal("2 items renamed", ui_sb_last()); |
498 |
498 |
|
|
499 |
499 |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
500 |
500 |
assert_success(unlink(SANDBOX_PATH "/adir/xyz")); |
assert_success(unlink(SANDBOX_PATH "/adir/xyz")); |
|
... |
... |
TEST(case_change_and_idential_names_in_different_dirs, IF(on_case_sensitive_fs)) |
522 |
522 |
|
|
523 |
523 |
ui_sb_msg(""); |
ui_sb_msg(""); |
524 |
524 |
(void)fops_case(&lwin, /*to_upper=*/1); |
(void)fops_case(&lwin, /*to_upper=*/1); |
525 |
|
assert_string_equal("2 files renamed", ui_sb_last()); |
|
|
525 |
|
assert_string_equal("2 items renamed", ui_sb_last()); |
526 |
526 |
|
|
527 |
527 |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
assert_failure(unlink(SANDBOX_PATH "/adir/abc")); |
528 |
528 |
assert_success(unlink(SANDBOX_PATH "/adir/ABC")); |
assert_success(unlink(SANDBOX_PATH "/adir/ABC")); |
|
... |
... |
allow_move_dlg_cb(const char type[], const char title[], const char message[]) |
537 |
537 |
{ |
{ |
538 |
538 |
assert_string_equal("prompt", type); |
assert_string_equal("prompt", type); |
539 |
539 |
assert_string_equal("Rename", title); |
assert_string_equal("Rename", title); |
540 |
|
assert_string_starts_with("It appears that the rename list has 1 file move,", |
|
|
540 |
|
assert_string_starts_with("It appears that the rename list has 1 move,", |
541 |
541 |
message); |
message); |
542 |
542 |
|
|
543 |
543 |
dlg_set_callback(NULL); |
dlg_set_callback(NULL); |
|
... |
... |
deny_move_dlg_cb(const char type[], const char title[], const char message[]) |
549 |
549 |
{ |
{ |
550 |
550 |
assert_string_equal("prompt", type); |
assert_string_equal("prompt", type); |
551 |
551 |
assert_string_equal("Rename", title); |
assert_string_equal("Rename", title); |
552 |
|
assert_string_starts_with("It appears that the rename list has 1 file move,", |
|
|
552 |
|
assert_string_starts_with("It appears that the rename list has 1 move,", |
553 |
553 |
message); |
message); |
554 |
554 |
|
|
555 |
555 |
dlg_set_callback(NULL); |
dlg_set_callback(NULL); |
File tests/lua/api_keys.c changed (mode: 100644) (index 0f710e51f..d3ad22d26) |
... |
... |
TEST(keys_selector_duplicated_indexes) |
190 |
190 |
ui_sb_msg(""); |
ui_sb_msg(""); |
191 |
191 |
(void)vle_keys_exec_timed_out(L"yX"); |
(void)vle_keys_exec_timed_out(L"yX"); |
192 |
192 |
assert_int_equal(1, curr_stats.save_msg); |
assert_int_equal(1, curr_stats.save_msg); |
193 |
|
assert_string_equal("1 file yanked", ui_sb_last()); |
|
|
193 |
|
assert_string_equal("1 item yanked", ui_sb_last()); |
194 |
194 |
} |
} |
195 |
195 |
|
|
196 |
196 |
TEST(keys_bad_selector_cursorpos) |
TEST(keys_bad_selector_cursorpos) |
|
... |
... |
TEST(keys_add_selector) |
280 |
280 |
|
|
281 |
281 |
(void)vle_keys_exec_timed_out(L"yX"); |
(void)vle_keys_exec_timed_out(L"yX"); |
282 |
282 |
assert_int_equal(1, curr_stats.save_msg); |
assert_int_equal(1, curr_stats.save_msg); |
283 |
|
assert_string_equal("2 files yanked", ui_sb_last()); |
|
|
283 |
|
assert_string_equal("2 items yanked", ui_sb_last()); |
284 |
284 |
|
|
285 |
285 |
const reg_t *reg = regs_find(DEFAULT_REG_NAME); |
const reg_t *reg = regs_find(DEFAULT_REG_NAME); |
286 |
286 |
assert_non_null(reg); |
assert_non_null(reg); |
File tests/misc/search_functional.c changed (mode: 100644) (index 72233185e..e846fe156) |
... |
... |
TEST(correct_match_number_is_shown_for_search_in_visual_mode) |
187 |
187 |
assert_int_equal(0, lwin.dir_entry[0].search_match); |
assert_int_equal(0, lwin.dir_entry[0].search_match); |
188 |
188 |
assert_int_equal(1, lwin.dir_entry[1].search_match); |
assert_int_equal(1, lwin.dir_entry[1].search_match); |
189 |
189 |
assert_int_equal(2, lwin.dir_entry[2].search_match); |
assert_int_equal(2, lwin.dir_entry[2].search_match); |
190 |
|
assert_string_starts_with("1 of 2 matching files", ui_sb_last()); |
|
|
190 |
|
assert_string_starts_with("1 of 2 matching items", ui_sb_last()); |
191 |
191 |
} |
} |
192 |
192 |
|
|
193 |
193 |
TEST(correct_cursor_position_for_incsearch_with_a_count) |
TEST(correct_cursor_position_for_incsearch_with_a_count) |
|
... |
... |
TEST(message_is_shown_after_incsearch_with_hlsearch_in_visual_mode) |
228 |
228 |
|
|
229 |
229 |
(void)vle_keys_exec_timed_out(WK_v WK_SLASH L"." WK_CR); |
(void)vle_keys_exec_timed_out(WK_v WK_SLASH L"." WK_CR); |
230 |
230 |
|
|
231 |
|
assert_string_starts_with("2 of 6 matching files", ui_sb_last()); |
|
|
231 |
|
assert_string_starts_with("2 of 6 matching items", ui_sb_last()); |
232 |
232 |
} |
} |
233 |
233 |
|
|
234 |
234 |
TEST(selection_isnt_dropped_on_empty_input_during_incsearch_with_hls_in_vismode) |
TEST(selection_isnt_dropped_on_empty_input_during_incsearch_with_hls_in_vismode) |
|
... |
... |
TEST(message_after_cursor_movements_during_incsearch) |
288 |
288 |
assert_int_equal(1, lwin.list_pos); |
assert_int_equal(1, lwin.list_pos); |
289 |
289 |
fpos_set_pos(&lwin, 2); |
fpos_set_pos(&lwin, 2); |
290 |
290 |
(void)vle_keys_exec_timed_out(WK_CR); |
(void)vle_keys_exec_timed_out(WK_CR); |
291 |
|
assert_string_starts_with("2 of 2 matching files", ui_sb_last()); |
|
|
291 |
|
assert_string_starts_with("2 of 2 matching items", ui_sb_last()); |
292 |
292 |
|
|
293 |
293 |
/* Show a message if no matches found. */ |
/* Show a message if no matches found. */ |
294 |
294 |
ui_sb_msg(""); |
ui_sb_msg(""); |