blob: 70437b901f70f6c11279f8b2a24acc07a7bb7573 [file] [log] [blame]
Bram Moolenaarcfe435d2020-04-25 20:02:55 +02001" Test commands that are not compiled in a :def function
2
Bram Moolenaar6378c4f2020-04-26 13:50:41 +02003source check.vim
Bram Moolenaarcfe435d2020-04-25 20:02:55 +02004source vim9.vim
5
6def Test_edit_wildcards()
7 let filename = 'Xtest'
8 edit `=filename`
9 assert_equal('Xtest', bufname())
10
11 let filenr = 123
12 edit Xtest`=filenr`
13 assert_equal('Xtest123', bufname())
14
15 filenr = 77
16 edit `=filename``=filenr`
17 assert_equal('Xtest77', bufname())
18
19 edit X`=filename`xx`=filenr`yy
20 assert_equal('XXtestxx77yy', bufname())
21enddef
22
Bram Moolenaar6378c4f2020-04-26 13:50:41 +020023def Test_hardcopy_wildcards()
24 CheckUnix
25 CheckFeature postscript
26
27 let outfile = 'print'
28 hardcopy > X`=outfile`.ps
29 assert_true(filereadable('Xprint.ps'))
30
31 delete('Xprint.ps')
32enddef
33
34def Test_syn_include_wildcards()
35 writefile(['syn keyword Found found'], 'Xthemine.vim')
36 let save_rtp = &rtp
37 &rtp = '.'
38
39 let fname = 'mine'
40 syn include @Group Xthe`=fname`.vim
41 assert_match('Found.* contained found', execute('syn list Found'))
42
43 &rtp = save_rtp
44 delete('Xthemine.vim')
45enddef
46
Bram Moolenaarcfe435d2020-04-25 20:02:55 +020047
48" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker