@@ -31,7 +31,7 @@ def earl_preamble(options)
3131end
3232
3333def run_tc ( tc , **options )
34- STDERR . write "run #{ tc . name } "
34+ STDERR . write "run #{ tc . name } "
3535
3636 if options [ :verbose ]
3737 puts "\n TestCase: #{ tc . inspect } "
@@ -41,9 +41,13 @@ def run_tc(tc, **options)
4141
4242 begin
4343 puts "open #{ tc . action } " if options [ :verbose ]
44- options = { base_uri : tc . base } . merge ( options )
44+ options = {
45+ base_uri : tc . base ,
46+ validate : tc . syntax? ,
47+ logger : tc . logger
48+ } . merge ( options )
4549
46- reader = RDF ::Reader . for ( tc . action ) . new ( tc . input , base_uri : tc . base , validate : tc . syntax? , logger : options [ :logger ] )
50+ reader = RDF ::Reader . for ( tc . action ) . new ( tc . input , ** options )
4751
4852 graph = RDF ::Repository . new
4953 result = nil
@@ -84,7 +88,7 @@ def run_tc(tc, **options)
8488 end
8589 end
8690
87- options [ :output ] . puts ( "\n Output:\n " + graph . dump ( :ntriples , validate : false ) ) unless options [ :quiet ]
91+ options [ :output ] . puts ( "\n Output:\n " + graph . dump ( :ntriples , validate : false ) ) if options [ :verbose ]
8892
8993 if options [ :earl ]
9094 options [ :output ] . puts %{
@@ -147,16 +151,20 @@ opts.each do |opt, arg|
147151 end
148152end
149153
150- manifest = Fixtures ::SuiteTest ::BASE + "manifest.ttl"
154+ manifests = [ Fixtures ::SuiteTest ::BASE + "rdf11/rdf-xml/" ] . map { | m | " #{ m } manifest.ttl"}
151155
152156earl_preamble ( options ) if options [ :earl ]
153157
154158result_count = { }
155159
156- Fixtures ::SuiteTest ::Manifest . open ( manifest ) do |m |
157- m . entries . each do |tc |
158- next unless ARGV . empty? || ARGV . any? { |n | tc . name . match ( /#{ n } / ) }
159- run_tc ( tc , **options . merge ( result_count : result_count ) )
160+ begin
161+ manifests . each do |manifest |
162+ Fixtures ::SuiteTest ::Manifest . open ( manifest ) do |m |
163+ m . entries . each do |tc |
164+ next unless ARGV . empty? || ARGV . any? { |n | tc . name . match ( /#{ n } / ) }
165+ run_tc ( tc , result_count : result_count , **options )
166+ end
167+ end
160168 end
161169end
162170
0 commit comments