mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
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.
This commit is contained in:
@@ -8,6 +8,7 @@ foreach(hfile ${PRE_HEADERS})
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile}
|
||||
COMMAND ${CMAKE_C_COMPILER} -std=c99 -E -P
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${hfile}
|
||||
-I${LIBUV_INCLUDE_DIRS}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${post_hfile})
|
||||
list(APPEND POST_HEADERS ${post_hfile})
|
||||
endforeach()
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#include <sys/errno.h>
|
||||
|
||||
static const int kENOENT = ENOENT;
|
||||
static const int kEEXIST = EEXIST;
|
||||
4
test/includes/pre/uv-errno.h
Normal file
4
test/includes/pre/uv-errno.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#include <uv-errno.h>
|
||||
|
||||
static const int kUV_ENOENT = UV_ENOENT;
|
||||
static const int kUV_EEXIST = UV_EEXIST;
|
||||
Reference in New Issue
Block a user