Skip to content

Commit

Permalink
✅ Add specs for !
Browse files Browse the repository at this point in the history
  • Loading branch information
hediyi committed Jul 1, 2016
1 parent 7d72659 commit e434194
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/ruby-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ describe "Ruby grammar", ->
{tokens} = grammar.tokenizeLine('not true')
expect(tokens[0]).toEqual value: 'not', scopes: ['source.ruby', 'keyword.operator.logical.ruby']

it "tokenizes ! when used in method name", ->
{tokens} = grammar.tokenizeLine('sort!')
expect(tokens[0]).toEqual value: 'sort!', scopes: ['source.ruby']

it "tokenizes ! as logical operator", ->
{tokens} = grammar.tokenizeLine('!foo')
expect(tokens[0]).toEqual value: '!', scopes: ['source.ruby', 'keyword.operator.logical.ruby']

it "tokenizes yard documentation comments", ->
{tokens} = grammar.tokenizeLine('# @private')
expect(tokens[0]).toEqual value: '#', scopes: ['source.ruby', 'comment.line.number-sign.ruby', 'punctuation.definition.comment.ruby']
Expand Down

0 comments on commit e434194

Please sign in to comment.