Mercurial > vim
annotate src/testdir/test_version.vim @ 33988:7c30841c60a0 v9.0.2180
patch 9.0.2180: POSIX function name in exarg causes issues
Commit: https://github.com/vim/vim/commit/6fdb6280821a822768df5689a5d727e37d38306c
Author: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Date: Tue Dec 19 20:53:07 2023 +0100
patch 9.0.2180: POSIX function name in exarg causes issues
Problem: POSIX function name in exarg struct causes issues
on OpenVMS
Solution: Rename getline member in exarg struct to ea_getline,
remove isinf() workaround for VMS
There are compilers that do not treat well POSIX functions - like
getline - usage in the structs.
Older VMS compilers could digest this... but the newer OpenVMS compilers
( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these
structs. This could be limited to getline() that is defined via
getdelim() and might not affect all POSIX functions in general - but
avoiding POSIX function names usage in the structs is a "safe side"
practice without compromising the functionality or the code readability.
The previous OpenVMS X86 port used a workaround limiting the compiler
capabilities using __CRTL_VER_OVERRIDE=80400000
In order to make the OpenVMS port future proof, this pull request
proposes a possible solution.
closes: #13704
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Dec 2023 21:00:04 +0100 |
parents | dfdd973cf0c9 |
children |
rev | line source |
---|---|
20035
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 " Test :version Ex command |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
23913
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
3 so check.vim |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
4 so shared.vim |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5 |
20035
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 func Test_version() |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 " version should always return the same string. |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 let v1 = execute('version') |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 let v2 = execute('version') |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 call assert_equal(v1, v2) |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 call assert_match("^\n\nVIM - Vi IMproved .*", v1) |
4c9acbd6b3c7
patch 8.2.0573: using :version twice leaks memory
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20035
diff
changeset
|
14 |
23913
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
15 func Test_version_redirect() |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
16 CheckNotGui |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
17 CheckCanRunGui |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
18 CheckUnix |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
19 |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
20 call RunVim([], [], '--clean -g --version >Xversion 2>&1') |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
21 call assert_match('Features included', readfile('Xversion')->join()) |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
22 |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
23 call delete('Xversion') |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
24 endfunc |
dfdd973cf0c9
patch 8.2.2499: "vim -g --version" does not redirect output
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
25 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
20035
diff
changeset
|
26 " vim: shiftwidth=2 sts=2 expandtab |