aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_ruby.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-06 20:39:53 -0500
committerGitHub <noreply@github.com>2020-12-06 20:39:53 -0500
commit7477703586af3710584888b197d84a0938a27fe9 (patch)
treea2b17e49945fcdb5879e79a5d46bd27e326659ca /src/nvim/testdir/test_ruby.vim
parent5855a3ea7bf19fdf8d1c0351ce062386fb98127a (diff)
parent8ae34ab7802763c2bbf64c8ba99c36d159da7220 (diff)
downloadrneovim-7477703586af3710584888b197d84a0938a27fe9.tar.gz
rneovim-7477703586af3710584888b197d84a0938a27fe9.tar.bz2
rneovim-7477703586af3710584888b197d84a0938a27fe9.zip
Merge pull request #13468 from janlazo/vim-8.1.0818
vim-patch:8.1.{818,1131,2064},8.2.{587,879,1021,1296,2104}
Diffstat (limited to 'src/nvim/testdir/test_ruby.vim')
-rw-r--r--src/nvim/testdir/test_ruby.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ruby.vim b/src/nvim/testdir/test_ruby.vim
index 9c74c35049..1a274d1fec 100644
--- a/src/nvim/testdir/test_ruby.vim
+++ b/src/nvim/testdir/test_ruby.vim
@@ -27,6 +27,19 @@ func Test_rubydo()
%bwipe!
endfunc
+func Test_rubydo_dollar_underscore()
+ throw 'skipped: TODO: '
+ new
+ call setline(1, ['one', 'two', 'three', 'four'])
+ 2,3rubydo $_ = '[' + $_ + ']'
+ call assert_equal(['one', '[two]', '[three]', 'four'], getline(1, '$'))
+ bwipe!
+
+ call assert_fails('rubydo $_ = 0', 'E265:')
+ call assert_fails('rubydo (')
+ bwipe!
+endfunc
+
func Test_rubyfile()
" Check :rubyfile does not SEGV with Ruby level exception but just fails
let tempfile = tempname() . '.rb'
@@ -391,3 +404,14 @@ func Test_ruby_p()
let messages = GetMessages()
call assert_equal(0, len(messages))
endfunc
+
+func Test_rubyeval_error()
+ " On Linux or Windows the error matches:
+ " "syntax error, unexpected end-of-input"
+ " whereas on macOS in CI, the error message makes less sense:
+ " "SyntaxError: array length must be 2"
+ " Unclear why. The test does not check the error message.
+ call assert_fails('call rubyeval("(")')
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab