Mercurial > vim
diff src/testdir/test_packadd.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 | b98c20b53a2d |
children | 457ea0570b6f |
line wrap: on
line diff
--- a/src/testdir/test_packadd.vim +++ b/src/testdir/test_packadd.vim @@ -3,7 +3,7 @@ source check.vim func SetUp() - let s:topdir = getcwd() . '/Xdir' + let s:topdir = getcwd() . '/Xppdir' exe 'set packpath=' . s:topdir let s:plugdir = s:topdir . '/pack/mine/opt/mytest' endfunc @@ -51,9 +51,9 @@ func Test_packadd() call assert_equal(77, g:plugin_also_works) call assert_equal(17, g:ftdetect_works) call assert_true(len(&rtp) > len(rtp)) - call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) + call assert_match('/testdir/Xppdir/pack/mine/opt/mytest\($\|,\)', &rtp) - let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,') + let new_after = match(&rtp, '/testdir/Xppdir/pack/mine/opt/mytest/after,') let forwarded = substitute(first_after_entry, '\\', '[/\\\\]', 'g') let old_after = match(&rtp, ',' . forwarded . '\>') call assert_true(new_after > 0, 'rtp is ' . &rtp) @@ -67,7 +67,7 @@ func Test_packadd() " Check the path of 'myte' is added call assert_true(len(&rtp) > len(rtp)) - call assert_match('/testdir/Xdir/pack/mine/opt/myte\($\|,\)', &rtp) + call assert_match('/testdir/Xppdir/pack/mine/opt/myte\($\|,\)', &rtp) " Check exception call assert_fails("packadd directorynotfound", 'E919:') @@ -89,7 +89,7 @@ func Test_packadd_start() call assert_equal(24, g:plugin_works) call assert_true(len(&rtp) > len(rtp)) - call assert_match('/testdir/Xdir/pack/mine/start/other\($\|,\)', &rtp) + call assert_match('/testdir/Xppdir/pack/mine/start/other\($\|,\)', &rtp) endfunc func Test_packadd_noload() @@ -106,7 +106,7 @@ func Test_packadd_noload() packadd! mytest call assert_true(len(&rtp) > len(rtp)) - call assert_match('testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) + call assert_match('testdir/Xppdir/pack/mine/opt/mytest\($\|,\)', &rtp) call assert_equal(0, g:plugin_works) " check the path is not added twice