[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vim testsuite: Test_platform_name
From: |
Zhaoming Luo |
Subject: |
vim testsuite: Test_platform_name |
Date: |
Mon, 3 Feb 2025 12:58:13 +0800 |
Hi,
This test failed is quite interesting. (source code [0])
Error log after running "make test_functions":
```
...
1 FAILED:
Found errors in Test_platform_name():
command line..script /home/1speaker/vim/src/testdir/runtest.vim[617]..function
RunTheTest[57]..Test_platform_name line 18: Expected 0 but got 1
...
```
The issue is on this line[1].
So the story in short is that vim thinks it is compiled for bsd kernel.
You can reproduce the issue by running `:echo has('bsd')` in vim on
Hurd. The implementation of `has()` is in [2]. The `has('bsd')` is
covered by `#if defined(BSD) && !defined(MACOS_X)`[3]. I haven't found a
practical method to track where the BSD macro is defined during
compilation.
[0]:
https://github.com/vim/vim/blob/v9.1.0967/src/testdir/test_functions.vim#L2755-L2781
[1]:
https://github.com/vim/vim/blob/v9.1.0967/src/testdir/test_functions.vim#L2773
[2]: https://github.com/vim/vim/blob/v9.1.0967/src/evalfunc.c#L6194
[3]: https://github.com/vim/vim/blob/v9.1.0967/src/evalfunc.c#L6227-L6232
Best,
Zhaoming
- vim testsuite: Test_platform_name,
Zhaoming Luo <=
Re: vim testsuite: Test_platform_name, Samuel Thibault, 2025/02/03