Sha256: 1cb7321b1157cacd1c18c865eb2ec5da4db76de31155c0757c29e36f48d6863d

Contents?: true

Size: 447 Bytes

Versions: 4

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper'
module Gisele::Language
  describe Grammar, 'spaces' do

    it 'parses all kind of spaces' do
      parse(' ', :spaces).should eq(' ')
      parse("\t", :spaces).should eq("\t")
      parse("\n", :spaces).should eq("\n")
      parse(" \t\n", :spaces).should eq(" \t\n")
    end

    it 'enforces mandatory spacing' do
      lambda{
        parse('', :spaces)
      }.should raise_error(Citrus::ParseError)
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gisele-language-0.6.0 spec/language/syntax/grammar/test_spaces.rb
gisele-language-0.5.1 spec/language/syntax/grammar/test_spaces.rb
gisele-language-0.5.0 spec/language/syntax/grammar/test_spaces.rb
gisele-0.5.0 spec/unit/language/syntax/grammar/test_spaces.rb