Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Hahler
f4942a63f9 build/tests: remove pre/uv.h #10531
Initially done in 28e59cb22, but does not appear to be necessary
anymore.

Uses UV_EEXIST directly, just like UV_ENOENT.
2019-07-28 11:10:22 +02:00
James McCoy
ba7704ab4e
test: Rename includes/pre/uv-errno.h to includes/pre/uv.h
libuv users are only supposed to directly include uv.h.  In v1.21.0, all
the uv-*.h headers were renamed to uv/*.h, which caused the unit tests
to fail with

    [123/125] Generating post/uv-errno.h
    FAILED: test/includes/post/uv-errno.h
    cd «SRCDIR»/src/neovim/build/test/includes && /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h
    «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with <angled> include; use "quotes" instead
    #include <uv-errno.h>
             ^~~~~~~~~~~~
             "uv-errno.h"

The intention of the file is to extend libuv's error constants with more
values used by the unit tests.  This can just as easily be achieved
without poking into pseudo-private header files.
2018-07-11 00:26:07 -04:00
ZyX
c49e22d396 Merge branch 'master' into s-dash-stdin 2017-12-03 16:49:30 +03:00
Michael Reed
729064af5f test: sys/fcntl.h -> fcntl.h
POSIX.1-2008[1] says that the latter should be used, and all of our
supported platforms would seem to support this scheme, apparently even
Windows[2].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
[2]: https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
2016-01-14 23:36:58 -05:00
Rui Abreu Ferreira
28e59cb223 Use libuv errors instead of errno in unit tests
Replaced old unit tests for errno with libuv error codes UV_ENOENT
and UV_EEXIST (for os_open and os_getperms).

Added libuv include path to test/includes compiler calls - needed
to get hold of libuv headers.
2015-11-25 23:16:37 +00:00
Justin M. Keyes
0ceebc2c91 os_open: add unit tests 2014-07-14 09:05:52 -04:00
Thomas Wienecke
1f578ec5a1 Add unit tests for mch_[gs]etperm.
Use preprocessor trick proposed by @mahkoh to import 'defines' like
S_IRUSR.
2014-03-15 11:50:22 -03:00