Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Add regression test for 'group' as variable
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Mar 21, 2017
1 parent d701942 commit 508e7e6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/gemfile-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ describe "Gemfile grammar", ->
{tokens} = grammar.tokenizeLine(':foo')
expect(tokens[0]).toEqual value: ':', scopes: ['source.ruby.gemfile', 'constant.other.symbol.ruby', 'punctuation.definition.constant.ruby']
expect(tokens[1]).toEqual value: 'foo', scopes: ['source.ruby.gemfile', 'constant.other.symbol.ruby']

it "tokenizes group properly in ruby code", ->
{tokens} = grammar.tokenizeLine('do |group|')
expect(tokens[0]).toEqual value: 'do', scopes: ['source.ruby.gemfile', 'keyword.control.start-block.ruby']
expect(tokens[1]).toEqual value: ' ', scopes: ['source.ruby.gemfile']
expect(tokens[2]).toEqual value: '|', scopes: ['source.ruby.gemfile', 'punctuation.separator.variable.ruby']
expect(tokens[3]).toEqual value: 'group', scopes: ['source.ruby.gemfile', 'variable.other.block.ruby']
expect(tokens[4]).toEqual value: '|', scopes: ['source.ruby.gemfile', 'punctuation.separator.variable.ruby']

0 comments on commit 508e7e6

Please sign in to comment.