Skip to content

Commit

Permalink
Test token map against current syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynetics committed Jun 18, 2023
1 parent 5a541ef commit 636bdbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/syntax/syntax_token_map_spec.rb
Expand Up @@ -2,16 +2,16 @@

RSpec.describe(Regexp::Syntax::Token::Map) do
let(:map) { Regexp::Syntax::Token::Map }
let(:latest_syntax) { Regexp::Syntax::V3_2_0 }
let(:current_syntax) { Regexp::Syntax::CURRENT }

specify('is complete') do
latest_syntax.features.each do |type, tokens|
current_syntax.features.each do |type, tokens|
tokens.each { |token| expect(map[type]).to include(token) }
end
end

specify('contains no duplicate tokens') do
latest_syntax.features.each do |_type, tokens|
current_syntax.features.each do |_type, tokens|
expect(tokens).to eq tokens.uniq
end
end
Expand Down

0 comments on commit 636bdbe

Please sign in to comment.