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