diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-17 18:11:55 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-17 18:14:24 +0100 |
commit | 62e14d65651e1815c108e806377ba25b377bf37c (patch) | |
tree | 88b9d51a290024a0a3eb1a0155f2d5db08a2336d | |
parent | 2ea7bfc627e57bc1dfc1a86b66a4be5c7eed2bec (diff) | |
download | rneovim-62e14d65651e1815c108e806377ba25b377bf37c.tar.gz rneovim-62e14d65651e1815c108e806377ba25b377bf37c.tar.bz2 rneovim-62e14d65651e1815c108e806377ba25b377bf37c.zip |
os_set_cloexec: Fix condition. #5986
Also: skip Test_undo_del_chars the right way. #6287
-rw-r--r-- | src/nvim/os/fs.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_undo.vim | 5 |
2 files changed, 3 insertions, 4 deletions
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 |