Sha256: 2c55e783c3ca8073c29937b39e4498acf5c15cdbb9a2295b8d174d3e56d6d577

Contents?: true

Size: 992 Bytes

Versions: 13

Compression:

Stored size: 992 Bytes

Contents

#
# ActiveFacts tests: Parse all NORMA files and check the generated CQL.
# Copyright (c) 2008 Clifford Heath. Read the LICENSE file.
#

require 'stringio'
require 'activefacts/vocabulary'
require 'activefacts/support'
require 'activefacts/input/cql'
require 'activefacts/generate/cql'

describe "CQL Parser" do
  cql_failures = {
    "Airline" => "Contains queries, unsupported",
    "CompanyQuery" => "Contains queries, unsupported",
  }

  pattern = ENV["AFTESTS"] || "*"
  Dir["examples/CQL/#{pattern}.cql"].each do |cql_file|
    it "should load CQL #{cql_file} without parse errors" do
      broken = cql_failures[File.basename(cql_file, ".cql")]

      vocabulary = nil
      if broken
        pending(broken) {
          lambda { vocabulary = ActiveFacts::Input::CQL.readfile(cql_file) }.should_not raise_error
        }
      else
        lambda { vocabulary = ActiveFacts::Input::CQL.readfile(cql_file) }.should_not raise_error
      end
      vocabulary.finalise
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
activefacts-1.6.0 spec/cql_parse_spec.rb
activefacts-1.5.3 spec/cql_parse_spec.rb
activefacts-1.5.2 spec/cql_parse_spec.rb
activefacts-1.5.1 spec/cql_parse_spec.rb
activefacts-1.5.0 spec/cql_parse_spec.rb
activefacts-1.3.0 spec/cql_parse_spec.rb
activefacts-1.2.1 spec/cql_parse_spec.rb
activefacts-1.2.0 spec/cql_parse_spec.rb
activefacts-1.1.0 spec/cql_parse_spec.rb
activefacts-1.0.2 spec/cql_parse_spec.rb
activefacts-1.0.1 spec/cql_parse_spec.rb
activefacts-1.0.0 spec/cql_parse_spec.rb
activefacts-0.8.18 spec/cql_parse_spec.rb