| File tests/misc/normal.c changed (mode: 100644) (index 3d71e8ab5..7d769c939) |
| 16 |
16 |
#include "../../src/ui/statusbar.h" |
#include "../../src/ui/statusbar.h" |
| 17 |
17 |
#include "../../src/ui/ui.h" |
#include "../../src/ui/ui.h" |
| 18 |
18 |
#include "../../src/utils/fs.h" |
#include "../../src/utils/fs.h" |
|
19 |
|
#include "../../src/utils/path.h" |
| 19 |
20 |
#include "../../src/utils/str.h" |
#include "../../src/utils/str.h" |
| 20 |
21 |
#include "../../src/filelist.h" |
#include "../../src/filelist.h" |
| 21 |
22 |
#include "../../src/flist_sel.h" |
#include "../../src/flist_sel.h" |
| |
| ... |
... |
TEST(cl_multiple_files, IF(not_windows)) |
| 447 |
448 |
undo_teardown(); |
undo_teardown(); |
| 448 |
449 |
} |
} |
| 449 |
450 |
|
|
|
451 |
|
TEST(al_rl, IF(not_windows), REPEAT(2)) |
|
452 |
|
{ |
|
453 |
|
const int al = (STIC_TEST_PARAM == 0); |
|
454 |
|
|
|
455 |
|
regs_init(); |
|
456 |
|
|
|
457 |
|
make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), TEST_DATA_PATH, "read", |
|
458 |
|
cwd); |
|
459 |
|
populate_dir_list(&lwin, /*reload=*/0); |
|
460 |
|
(void)vle_keys_exec_timed_out(L"yy"); |
|
461 |
|
|
|
462 |
|
make_abs_path(lwin.curr_dir, sizeof(lwin.curr_dir), SANDBOX_PATH, "", cwd); |
|
463 |
|
populate_dir_list(&lwin, /*reload=*/0); |
|
464 |
|
|
|
465 |
|
ui_sb_msg(""); |
|
466 |
|
(void)vle_keys_exec_timed_out(al ? L"al" : L"rl"); |
|
467 |
|
assert_success(chdir(cwd)); |
|
468 |
|
|
|
469 |
|
char target[PATH_MAX + 1]; |
|
470 |
|
assert_success(get_link_target(SANDBOX_PATH "/binary-data", target, |
|
471 |
|
sizeof(target))); |
|
472 |
|
|
|
473 |
|
assert_string_ends_with("/binary-data", target); |
|
474 |
|
if(al) |
|
475 |
|
{ |
|
476 |
|
assert_string_equal("1 item linked (abs)", ui_sb_last()); |
|
477 |
|
assert_true(is_path_absolute(target)); |
|
478 |
|
} |
|
479 |
|
else |
|
480 |
|
{ |
|
481 |
|
assert_string_equal("1 item linked (rel)", ui_sb_last()); |
|
482 |
|
assert_false(is_path_absolute(target)); |
|
483 |
|
} |
|
484 |
|
|
|
485 |
|
remove_file(SANDBOX_PATH "/binary-data"); |
|
486 |
|
|
|
487 |
|
regs_reset(); |
|
488 |
|
} |
|
489 |
|
|
| 450 |
490 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
| 451 |
491 |
/* vim: set cinoptions+=t0 filetype=c : */ |
/* vim: set cinoptions+=t0 filetype=c : */ |