Sha256: 8e42d97c616a0bf42e7b3a1c9af23739057d46f744fa97bbe826c721bbc851d6

Contents?: true

Size: 756 Bytes

Versions: 4

Compression:

Stored size: 756 Bytes

Contents

let s:suite = themis#suite(":rubyeval")
let s:expect = themis#helper("expect")

function! s:suite.evaluates_ruby_objects() abort
  call s:expect(rubyeval("123")).to_equal(123)
  call s:expect(rubyeval("1.2")).to_equal(1.2)
  call s:expect(rubyeval("'test'")).to_equal("test")
  call s:expect(rubyeval("nil")).to_equal(v:null)
  call s:expect(rubyeval("true")).to_equal(v:true)
  call s:expect(rubyeval("false")).to_equal(v:false)
  call s:expect(rubyeval("{x: 1}")).to_equal({"x": 1})
  call s:expect(rubyeval(":test")).to_equal("test")
  call s:expect(rubyeval(":test.class")).to_equal("Symbol")
endfunction

function! s:suite.propagates_exceptions() abort
  try
    rubyeval("raise 'BOOM'")
    throw "Nothing raised"
  catch /BOOM/
  endtry
endfunction

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
neovim-0.10.0 spec/acceptance/rubyeval_spec.vim
neovim-0.9.1 spec/acceptance/rubyeval_spec.vim
neovim-0.9.0 spec/acceptance/rubyeval_spec.vim
neovim-0.9.0.pre.1 spec/acceptance/rubyeval_spec.vim