aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_ruby.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /test/old/testdir/test_ruby.vim
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-rahm.tar.gz
rneovim-rahm.tar.bz2
rneovim-rahm.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'test/old/testdir/test_ruby.vim')
-rw-r--r--test/old/testdir/test_ruby.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/old/testdir/test_ruby.vim b/test/old/testdir/test_ruby.vim
index d4a3dc3301..94941da873 100644
--- a/test/old/testdir/test_ruby.vim
+++ b/test/old/testdir/test_ruby.vim
@@ -282,7 +282,7 @@ func Test_ruby_Vim_buffer_get()
call assert_match('Xfoo1$', rubyeval('Vim::Buffer[1].name'))
call assert_match('Xfoo2$', rubyeval('Vim::Buffer[2].name'))
call assert_fails('ruby print Vim::Buffer[3].name',
- \ "NoMethodError: undefined method `name' for nil")
+ \ "NoMethodError")
%bwipe
endfunc
@@ -364,7 +364,7 @@ func Test_ruby_Vim_evaluate_dict()
redir => l:out
ruby d = Vim.evaluate("d"); print d
redir END
- call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
+ call assert_equal(['{"a"=>"foo","b"=>123}'], split(substitute(l:out, '\s', '', 'g'), "\n"))
endfunc
" Test Vim::message({msg}) (display message {msg})
@@ -384,7 +384,7 @@ func Test_ruby_print()
call assert_equal('1.23', RubyPrint('1.23'))
call assert_equal('Hello World!', RubyPrint('"Hello World!"'))
call assert_equal('[1, 2]', RubyPrint('[1, 2]'))
- call assert_equal('{"k1"=>"v1", "k2"=>"v2"}', RubyPrint('({"k1" => "v1", "k2" => "v2"})'))
+ call assert_equal('{"k1"=>"v1","k2"=>"v2"}', substitute(RubyPrint('({"k1" => "v1", "k2" => "v2"})'), '\s', '', 'g'))
call assert_equal('true', RubyPrint('true'))
call assert_equal('false', RubyPrint('false'))
call assert_equal('', RubyPrint('nil'))
@@ -439,7 +439,10 @@ Vim.command('let s ..= "B"')
ruby << trim eof
Vim.command('let s ..= "E"')
eof
- call assert_equal('ABCDE', s)
+ruby << trimm
+Vim.command('let s ..= "F"')
+trimm
+ call assert_equal('ABCDEF', s)
endfunc
" vim: shiftwidth=2 sts=2 expandtab