blob: 958c126a42f9ac28150548c83a3e968bb47f7e22 [file] [log] [blame]
Bram Moolenaar278e8382020-04-13 18:25:33 +02001" Test :version Ex command
2
Bram Moolenaar3b678042021-02-11 19:08:05 +01003so check.vim
4so shared.vim
5
Bram Moolenaar278e8382020-04-13 18:25:33 +02006func Test_version()
7 " version should always return the same string.
8 let v1 = execute('version')
9 let v2 = execute('version')
10 call assert_equal(v1, v2)
11
12 call assert_match("^\n\nVIM - Vi IMproved .*", v1)
13endfunc
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020014
Bram Moolenaar3b678042021-02-11 19:08:05 +010015func Test_version_redirect()
16 CheckNotGui
17 CheckCanRunGui
18 CheckUnix
19
20 call RunVim([], [], '--clean -g --version >Xversion 2>&1')
21 call assert_match('Features included', readfile('Xversion')->join())
22
23 call delete('Xversion')
24endfunc
25
Bram Moolenaar6d91bcb2020-08-12 18:50:36 +020026" vim: shiftwidth=2 sts=2 expandtab