mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-12 14:51:16 -03:00
Use an unlikely to collide username for tests
The prefix 'haha' is short enough, (and phonetic enough), that it could collide with an existing user on the system where the tests are running, causing the test to fail.
This commit is contained in:
committed by
Johannes Altmanninger
parent
15817a0b07
commit
8c0ee6ebc9
@@ -3228,11 +3228,11 @@ static void test_autosuggest_suggest_special() {
|
||||
__LINE__);
|
||||
|
||||
// Don't crash on ~ (issue #2696). Note this is cwd dependent.
|
||||
if (system("mkdir -p '~hahaha/path1/path2/'")) err(L"mkdir failed");
|
||||
perform_one_autosuggestion_cd_test(L"cd ~haha", L"ha/path1/path2/", vars, __LINE__);
|
||||
perform_one_autosuggestion_cd_test(L"cd ~hahaha/", L"path1/path2/", vars, __LINE__);
|
||||
perform_one_completion_cd_test(L"cd ~haha", L"ha/", vars, __LINE__);
|
||||
perform_one_completion_cd_test(L"cd ~hahaha/", L"path1/", vars, __LINE__);
|
||||
if (system("mkdir -p '~absolutelynosuchuser/path1/path2/'")) err(L"mkdir failed");
|
||||
perform_one_autosuggestion_cd_test(L"cd ~absolutelynosuchus", L"er/path1/path2/", vars, __LINE__);
|
||||
perform_one_autosuggestion_cd_test(L"cd ~absolutelynosuchuser/", L"path1/path2/", vars, __LINE__);
|
||||
perform_one_completion_cd_test(L"cd ~absolutelynosuchus", L"er/", vars, __LINE__);
|
||||
perform_one_completion_cd_test(L"cd ~absolutelynosuchuser/", L"path1/", vars, __LINE__);
|
||||
|
||||
parser_t::principal_parser().vars().remove(L"HOME", ENV_LOCAL | ENV_EXPORT);
|
||||
popd();
|
||||
|
||||
Reference in New Issue
Block a user