Sha256: ec666f17685e383dae9f4c69c53e6ce93c8eba910a115b343b36ad7ff85b5c5b

Contents?: true

Size: 1.28 KB

Versions: 8

Compression:

Stored size: 1.28 KB

Contents

$:.unshift "."
require File.join(File.dirname(__FILE__), 'spec_helper')

describe RDF::N3::Reader do
  describe "w3c cwm tests" do
    require 'cwm_test'

    # Negative parser tests should raise errors.
    Fixtures::Cwm::CwmTest.each do |t|
      next unless t.inputDocument
      #next unless t.about.uri.to_s =~ /rdfms-rdf-names-use/
      #next unless t.name =~ /1018/
      #puts t.inspect
      specify "test #{t.name}: #{t.description}: #{t.inputDocument} against #{t.referenceOutput}" do
        begin
          if t.name =~ /1018/
            pending("matcher does not stop")
            next
          elsif !t.arguments.to_s.empty?
            pending("proofs not supported")
            next
          end
          t.run_test do
            t.debug = []
            g = RDF::Graph.new
            RDF::Reader.for(t.inputDocument).new(t.input,
                :base_uri => t.inputDocument,
                :strict => true,
                :debug => t.debug).each do |statement|
              g << statement
            end
            g
          end
        rescue RSpec::Expectations::ExpectationNotMetError => e
          if t.status == "pending"
            pending("Formulae not supported") {  raise } 
          else
            raise
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rdf-n3-0.3.4.1 spec/cwm_spec.rb
rdf-n3-0.3.4 spec/cwm_spec.rb
rdf-n3-0.3.3.1 spec/cwm_spec.rb
rdf-n3-0.3.3 spec/cwm_spec.rb
rdf-n3-0.3.1.3 spec/cwm_spec.rb
rdf-n3-0.3.1.2 spec/cwm_spec.rb
rdf-n3-0.3.1.1 spec/cwm_spec.rb
rdf-n3-0.3.1 spec/cwm_spec.rb