From d2c65bc26e7b000938c2fdf7613834f36800bfb1 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Mon, 16 Oct 2023 12:02:57 -0700 Subject: [PATCH] Local tests are linked from spec/rdf-tests. --- script/tc | 3 +++ spec/.gitignore | 5 +---- spec/suite_helper.rb | 9 ++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/script/tc b/script/tc index 852f63e..b15b6fd 100755 --- a/script/tc +++ b/script/tc @@ -94,6 +94,9 @@ def run_tc(tc, **options) result ||= "passed" end + if options[:verbose] && result == "failed" && graph + puts "\nResult:\n" + graph.dump(:nquads) + end rescue Interrupt => e raise e rescue Exception => e diff --git a/spec/.gitignore b/spec/.gitignore index a1f60e7..3f8747f 100644 --- a/spec/.gitignore +++ b/spec/.gitignore @@ -1,4 +1 @@ -/uri-cache/ -/w3c-rdf -/w3c-rdf-tests -/w3c-rdf-star +rdf-tests diff --git a/spec/suite_helper.rb b/spec/suite_helper.rb index e673a84..6a4912b 100644 --- a/spec/suite_helper.rb +++ b/spec/suite_helper.rb @@ -7,7 +7,7 @@ module RDF::Util module File REMOTE_PATH = "https://w3c.github.io/rdf-tests/rdf/" - LOCAL_PATH = ::File.expand_path("../w3c-rdf-tests/rdf/", __FILE__) + '/' + LOCAL_PATH = ::File.expand_path("../rdf-tests/rdf/", __FILE__) + '/' class << self alias_method :original_open_file, :open_file @@ -111,18 +111,13 @@ def self.from_jsonld(json) def entries # Map entries to resources - attributes['entries'].map {|e| Entry.new(e, base_iri: attributes['baseIri'])} + attributes['entries'].map {|e| Entry.new(e)} end end class Entry < JSON::LD::Resource attr_accessor :logger - def initialize(json, base_iri:) - @base_iri = base_iri - super - end - def base RDF::URI(@base_iri || action) end