1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/vim-elixir/spec/syntax/numbers_spec.rb
2022-05-19 01:31:41 +08:00

45 lines
1.1 KiB
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Numbers syntax' do
describe 'decimal' do
it 'positive is colorized' do
expect('123').to include_elixir_syntax('elixirNumber', '123')
end
it 'negative is colorized' do
expect('-123').to include_elixir_syntax('elixirNumber', '123')
end
end
describe 'hexadecimal' do
it 'positive is colorized' do
expect('0xdeadbeaf').to include_elixir_syntax('elixirNumber', '0xdeadbeaf')
end
it 'negative is colorized' do
expect('-0xdeadbeaf').to include_elixir_syntax('elixirNumber', '0xdeadbeaf')
end
end
describe 'octal' do
it 'positive is colorized' do
expect('0o777').to include_elixir_syntax('elixirNumber', '0o777')
end
it 'negative is colorized' do
expect('-0o777').to include_elixir_syntax('elixirNumber', '0o777')
end
end
describe 'binary' do
it 'positive is colorized' do
expect('0b1011').to include_elixir_syntax('elixirNumber', '0b1011')
end
it 'negative is colorized' do
expect('-0b1011').to include_elixir_syntax('elixirNumber', '0b1011')
end
end
end