mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
Instantize env_get inside highlighting
This commit is contained in:
@@ -2133,24 +2133,26 @@ static void test_is_potential_path() {
|
||||
const wcstring wd = L"test/is_potential_path_test/";
|
||||
const wcstring_list_t wds({L".", wd});
|
||||
|
||||
do_test(is_potential_path(L"al", wds, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"alpha/", wds, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"aard", wds, 0));
|
||||
const auto &vars = env_stack_t::principal();
|
||||
do_test(is_potential_path(L"al", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"alpha/", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"aard", wds, vars, 0));
|
||||
|
||||
do_test(!is_potential_path(L"balpha/", wds, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aard", wds, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aarde", wds, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aarde", wds, 0));
|
||||
do_test(!is_potential_path(L"balpha/", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aard", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aarde", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"aarde", wds, vars, 0));
|
||||
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/aardvark", wds, 0));
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/al", wds, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/aardv", wds, 0));
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/aardvark", wds, vars, 0));
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/al", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"test/is_potential_path_test/aardv", wds, vars, 0));
|
||||
|
||||
do_test(!is_potential_path(L"test/is_potential_path_test/aardvark", wds, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"test/is_potential_path_test/al/", wds, 0));
|
||||
do_test(!is_potential_path(L"test/is_potential_path_test/ar", wds, 0));
|
||||
do_test(
|
||||
!is_potential_path(L"test/is_potential_path_test/aardvark", wds, vars, PATH_REQUIRE_DIR));
|
||||
do_test(!is_potential_path(L"test/is_potential_path_test/al/", wds, vars, 0));
|
||||
do_test(!is_potential_path(L"test/is_potential_path_test/ar", wds, vars, 0));
|
||||
|
||||
do_test(is_potential_path(L"/usr", wds, PATH_REQUIRE_DIR));
|
||||
do_test(is_potential_path(L"/usr", wds, vars, PATH_REQUIRE_DIR));
|
||||
}
|
||||
|
||||
/// Test the 'test' builtin.
|
||||
|
||||
Reference in New Issue
Block a user