Sha256: e900fb7269d40b6351e1ec76c9ad1540b465b33fb01916e7cdc4a96b7ba820d4

Contents?: true

Size: 742 Bytes

Versions: 76

Compression:

Stored size: 742 Bytes

Contents

require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")

describe "An expression for braces surrounding zero or more letters followed by semicolons" do
  testing_expression "'{' ([a-z] ';')* '}'"
  
  it "parses matching input successfully" do
    parse('{a;b;c;}').should_not be_nil
  end
  
  it "fails to parse input with an expression that is missing a semicolon, reporting the terminal failure occurring at the maximum index" do
    parse('{a;b;c}') do |result|
      result.should be_nil
      
      terminal_failures = parser.terminal_failures
      terminal_failures.size.should == 1      
      failure = terminal_failures[0]
      failure.index.should == 6
      failure.expected_string.should == ';'
    end
  end
end

Version data entries

76 entries across 76 versions & 7 rubygems

Version Path
cloudhead-less-1.0.1 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.10 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.13 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.16 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.2 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.3 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.4 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.5 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.6 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.8 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.0.9 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.0 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.1 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.10 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.11 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.12 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.13 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.2 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.3 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb
cloudhead-less-1.1.4 lib/vendor/treetop/spec/compiler/failure_propagation_functional_spec.rb