dotfiles/vim/plugins/vim-elixir-master/spec/syntax/keyword_spec.rb
Jeff Clement 931e9d4aee
mise++
2025-03-08 20:32:06 -07:00

27 lines
624 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Keyword syntax' do
it 'for used as keyword' do
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'for')
for v <- [1, 3, 3]
EOF
end
it 'case used as keyword' do
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'case')
case true do
EOF
end
it 'raise used as keyword' do
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'raise')
raise "oops"
EOF
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'raise')
raise ArgumentError, message: "invalid argument foo"
EOF
end
end