Mercurial > vim
comparison src/testdir/test_startup.vim @ 29970:d891115c0aea v9.0.0323
patch 9.0.0323: using common name in tests leads to flaky tests
Commit: https://github.com/vim/vim/commit/3b0d70f4ff436cb144683dafd956e8a3ee485a90
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 29 22:31:20 2022 +0100
patch 9.0.0323: using common name in tests leads to flaky tests
Problem: Using common name in tests leads to flaky tests.
Solution: Rename files and directories to be more specific.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 29 Aug 2022 23:45:04 +0200 |
parents | 5f314b2ed494 |
children | dc238f2c7355 |
comparison
equal
deleted
inserted
replaced
29969:5f2d38cacd6c | 29970:d891115c0aea |
---|---|
1062 call assert_equal(1, &secure) | 1062 call assert_equal(1, &secure) |
1063 call assert_equal(37, exrc_found) | 1063 call assert_equal(37, exrc_found) |
1064 call writefile(v:errors, 'Xtestout') | 1064 call writefile(v:errors, 'Xtestout') |
1065 qall | 1065 qall |
1066 [CODE] | 1066 [CODE] |
1067 call mkdir('Xdir') | 1067 call mkdir('Xrcdir') |
1068 call writefile(['let exrc_found=37'], 'Xdir/.exrc') | 1068 call writefile(['let exrc_found=37'], 'Xrcdir/.exrc') |
1069 call writefile(after, 'Xdir/Xafter') | 1069 call writefile(after, 'Xrcdir/Xafter') |
1070 let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "cd Xdir" --cmd "set enc=utf8 exrc secure"' | 1070 let cmd = GetVimProg() . ' --not-a-term -S Xafter --cmd "cd Xrcdir" --cmd "set enc=utf8 exrc secure"' |
1071 exe "silent !" . cmd | 1071 exe "silent !" . cmd |
1072 call assert_equal([], readfile('Xdir/Xtestout')) | 1072 call assert_equal([], readfile('Xrcdir/Xtestout')) |
1073 call delete('Xdir', 'rf') | 1073 call delete('Xrcdir', 'rf') |
1074 endfunc | 1074 endfunc |
1075 | 1075 |
1076 " Test for starting Vim with a non-terminal as input/output | 1076 " Test for starting Vim with a non-terminal as input/output |
1077 func Test_io_not_a_terminal() | 1077 func Test_io_not_a_terminal() |
1078 " Can't catch the output of gvim. | 1078 " Can't catch the output of gvim. |
1123 call delete('Xscriptin') | 1123 call delete('Xscriptin') |
1124 | 1124 |
1125 " Test for failing to open the script output file. This test works only when | 1125 " Test for failing to open the script output file. This test works only when |
1126 " the language is English. | 1126 " the language is English. |
1127 if v:lang == "C" || v:lang =~ '^[Ee]n' | 1127 if v:lang == "C" || v:lang =~ '^[Ee]n' |
1128 call mkdir("Xdir") | 1128 call mkdir("Xargdir") |
1129 let m = system(GetVimCommand() .. " -w Xdir") | 1129 let m = system(GetVimCommand() .. " -w Xargdir") |
1130 call assert_equal("Cannot open for script output: \"Xdir\"\n", m) | 1130 call assert_equal("Cannot open for script output: \"Xargdir\"\n", m) |
1131 call delete("Xdir", 'rf') | 1131 call delete("Xargdir", 'rf') |
1132 endif | 1132 endif |
1133 | 1133 |
1134 " A number argument sets the 'window' option | 1134 " A number argument sets the 'window' option |
1135 call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b') | 1135 call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b') |
1136 for w_arg in ['-w 17', '-w17'] | 1136 for w_arg in ['-w 17', '-w17'] |