From 62e14d65651e1815c108e806377ba25b377bf37c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 17 Mar 2017 18:11:55 +0100 Subject: os_set_cloexec: Fix condition. #5986 Also: skip Test_undo_del_chars the right way. #6287 --- src/nvim/os/fs.c | 2 +- src/nvim/testdir/test_undo.vim | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index af60e1b7af..2beeae7ec6 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -406,7 +406,7 @@ int os_set_cloexec(const int fd) return -1; } if ((fdflags & FD_CLOEXEC) == 0 - && fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) < 0) { + && fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC) == -1) { e = errno; ELOG("Failed to set CLOEXEC on descriptor %d: %s", fd, strerror(e)); errno = e; diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index ff8ec67b0b..fc61d1f223 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -74,9 +74,8 @@ func BackOne(expected) call assert_equal(a:expected, getline(1)) endfunc -" Test is disabled: Nvim does not support test_settime(). -func Test_undo_del_chars_skipped() - return +func Test_undo_del_chars() + throw 'skipped: Nvim does not support test_settime()' " Setup a buffer without creating undo entries new -- cgit