comparison src/testdir/test_expand.vim @ 30051:13b02c1ea0f7 v9.0.0363

patch 9.0.0363: common names in test files causes tests to be flaky Commit: https://github.com/vim/vim/commit/b18b49699776485150b71626069a40d12d2c5590 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 2 21:55:50 2022 +0100 patch 9.0.0363: common names in test files causes tests to be flaky Problem: Common names in test files causes tests to be flaky. Solution: Use more specific names.
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Sep 2022 23:00:04 +0200
parents c428a4e53b9c
children ea38db8639eb
comparison
equal deleted inserted replaced
30050:4d0a9c80a90c 30051:13b02c1ea0f7
55 let $FOO = 'Test' 55 let $FOO = 'Test'
56 call assert_equal('e x/Test/y', expandcmd('e x/$FOO/y')) 56 call assert_equal('e x/Test/y', expandcmd('e x/$FOO/y'))
57 unlet $FOO 57 unlet $FOO
58 58
59 new 59 new
60 edit Xfile1 60 edit Xpandfile1
61 call assert_equal('e Xfile1', expandcmd('e %')) 61 call assert_equal('e Xpandfile1', expandcmd('e %'))
62 edit Xfile2 62 edit Xpandfile2
63 edit Xfile1 63 edit Xpandfile1
64 call assert_equal('e Xfile2', 'e #'->expandcmd()) 64 call assert_equal('e Xpandfile2', 'e #'->expandcmd())
65 edit Xfile2 65 edit Xpandfile2
66 edit Xfile3 66 edit Xpandfile3
67 edit Xfile4 67 edit Xpandfile4
68 let bnum = bufnr('Xfile2') 68 let bnum = bufnr('Xpandfile2')
69 call assert_equal('e Xfile2', expandcmd('e #' . bnum)) 69 call assert_equal('e Xpandfile2', expandcmd('e #' . bnum))
70 call setline('.', 'Vim!@#') 70 call setline('.', 'Vim!@#')
71 call assert_equal('e Vim', expandcmd('e <cword>')) 71 call assert_equal('e Vim', expandcmd('e <cword>'))
72 call assert_equal('e Vim!@#', expandcmd('e <cWORD>')) 72 call assert_equal('e Vim!@#', expandcmd('e <cWORD>'))
73 enew! 73 enew!
74 edit Xfile.java 74 edit Xpandfile.java
75 call assert_equal('e Xfile.py', expandcmd('e %:r.py')) 75 call assert_equal('e Xpandfile.py', expandcmd('e %:r.py'))
76 call assert_equal('make abc.java', expandcmd('make abc.%:e')) 76 call assert_equal('make abc.java', expandcmd('make abc.%:e'))
77 call assert_equal('make Xabc.java', expandcmd('make %:s?file?abc?')) 77 call assert_equal('make Xabc.java', expandcmd('make %:s?pandfile?abc?'))
78 edit a1a2a3.rb 78 edit a1a2a3.rb
79 call assert_equal('make b1b2b3.rb a1a2a3 Xfile.o', expandcmd('make %:gs?a?b? %< #<.o')) 79 call assert_equal('make b1b2b3.rb a1a2a3 Xpandfile.o', expandcmd('make %:gs?a?b? %< #<.o'))
80 80
81 call assert_equal('make <afile>', expandcmd("make <afile>")) 81 call assert_equal('make <afile>', expandcmd("make <afile>"))
82 call assert_equal('make <amatch>', expandcmd("make <amatch>")) 82 call assert_equal('make <amatch>', expandcmd("make <amatch>"))
83 call assert_equal('make <abuf>', expandcmd("make <abuf>")) 83 call assert_equal('make <abuf>', expandcmd("make <abuf>"))
84 enew 84 enew