mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 16:42:42 +00:00
Windows: Fix functionaltest fixtures
This commit is contained in:
@@ -398,7 +398,11 @@ message(STATUS "Using the Lua interpreter ${LUA_PRG}.")
|
|||||||
find_program(BUSTED_PRG busted)
|
find_program(BUSTED_PRG busted)
|
||||||
find_program(BUSTED_LUA_PRG busted-lua)
|
find_program(BUSTED_LUA_PRG busted-lua)
|
||||||
if(NOT BUSTED_OUTPUT_TYPE)
|
if(NOT BUSTED_OUTPUT_TYPE)
|
||||||
set(BUSTED_OUTPUT_TYPE "utfTerminal")
|
if(WIN32)
|
||||||
|
set(BUSTED_OUTPUT_TYPE "plainTerminal")
|
||||||
|
else()
|
||||||
|
set(BUSTED_OUTPUT_TYPE "utfTerminal")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_program(LUACHECK_PRG luacheck)
|
find_program(LUACHECK_PRG luacheck)
|
||||||
@@ -466,7 +470,11 @@ if(BUSTED_PRG)
|
|||||||
${CMAKE_BINARY_DIR}/test/config/paths.lua)
|
${CMAKE_BINARY_DIR}/test/config/paths.lua)
|
||||||
|
|
||||||
set(UNITTEST_PREREQS nvim-test unittest-headers)
|
set(UNITTEST_PREREQS nvim-test unittest-headers)
|
||||||
set(FUNCTIONALTEST_PREREQS nvim tty-test shell-test)
|
if(WIN32)
|
||||||
|
set(FUNCTIONALTEST_PREREQS nvim shell-test)
|
||||||
|
else()
|
||||||
|
set(FUNCTIONALTEST_PREREQS nvim tty-test shell-test)
|
||||||
|
endif()
|
||||||
set(BENCHMARK_PREREQS nvim tty-test)
|
set(BENCHMARK_PREREQS nvim tty-test)
|
||||||
|
|
||||||
# Useful for automated build systems, if they want to manually run the tests.
|
# Useful for automated build systems, if they want to manually run the tests.
|
||||||
|
|||||||
@@ -31,12 +31,14 @@ static void walk_cb(uv_handle_t *handle, void *arg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
static void sigwinch_handler(int signum)
|
static void sigwinch_handler(int signum)
|
||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
uv_tty_get_winsize(&tty, &width, &height);
|
uv_tty_get_winsize(&tty, &width, &height);
|
||||||
fprintf(stderr, "rows: %d, cols: %d\n", height, width);
|
fprintf(stderr, "rows: %d, cols: %d\n", height, width);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// static void sigwinch_cb(uv_signal_t *handle, int signum)
|
// static void sigwinch_cb(uv_signal_t *handle, int signum)
|
||||||
// {
|
// {
|
||||||
@@ -135,6 +137,7 @@ int main(int argc, char **argv)
|
|||||||
uv_tty_set_mode(&tty, UV_TTY_MODE_RAW);
|
uv_tty_set_mode(&tty, UV_TTY_MODE_RAW);
|
||||||
tty.data = &interrupted;
|
tty.data = &interrupted;
|
||||||
uv_read_start((uv_stream_t *)&tty, alloc_cb, read_cb);
|
uv_read_start((uv_stream_t *)&tty, alloc_cb, read_cb);
|
||||||
|
#ifndef WIN32
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
@@ -144,6 +147,7 @@ int main(int argc, char **argv)
|
|||||||
// uv_signal_init(uv_default_loop(), &sigwinch_watcher);
|
// uv_signal_init(uv_default_loop(), &sigwinch_watcher);
|
||||||
// sigwinch_watcher.data = &tty;
|
// sigwinch_watcher.data = &tty;
|
||||||
// uv_signal_start(&sigwinch_watcher, sigwinch_cb, SIGWINCH);
|
// uv_signal_start(&sigwinch_watcher, sigwinch_cb, SIGWINCH);
|
||||||
|
#endif
|
||||||
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user