Skip to content

Commit b73aae0

Browse files
committed
Don't run streaming tests with script/tc without --stream, and then only run streaming tests.
1 parent 58b562b commit b73aae0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

script/tc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def run_tc(man, tc, options)
8181

8282
result = case tc.testType
8383
when 'jld:CompactTest'
84-
output = JSON::LD::API.compact(tc.input_loc, tc.context_json, validate: true, **tc.options)
84+
output = JSON::LD::API.compact(tc.input_loc, tc.context_json['@context'], validate: true, **tc.options)
8585
expected = JSON.load(tc.expect) if tc.evaluationTest? && tc.positiveTest?
8686
compare_results(tc, output, expected)
8787
when 'jld:ExpandTest'
@@ -90,7 +90,7 @@ def run_tc(man, tc, options)
9090
expected = JSON.load(tc.expect) if tc.evaluationTest? && tc.positiveTest?
9191
compare_results(tc, output, expected)
9292
when 'jld:FlattenTest'
93-
output = JSON::LD::API.flatten(tc.input_loc, (tc.context_json if tc.context_loc), validate: true, **tc.options)
93+
output = JSON::LD::API.flatten(tc.input_loc, (tc.context_json['@context'] if tc.context_loc), validate: true, **tc.options)
9494
expected = JSON.load(tc.expect) if tc.evaluationTest? && tc.positiveTest?
9595
compare_results(tc, output, expected)
9696
when 'jld:FrameTest'
@@ -248,11 +248,14 @@ opts.each do |opt, arg|
248248
end
249249
end
250250

251-
manifests = %w(expand compact flatten fromRdf html remote-doc toRdf).map do |man|
252-
"#{Fixtures::SuiteTest::SUITE}#{man}-manifest.jsonld"
253-
end +
254-
["#{Fixtures::SuiteTest::FRAME_SUITE}frame-manifest.jsonld"] +
251+
manifests = if options[:stream]
255252
["#{Fixtures::SuiteTest::STREAM_SUITE}stream-toRdf-manifest.jsonld"]
253+
else
254+
%w(expand compact flatten fromRdf html remote-doc toRdf).map do |man|
255+
"#{Fixtures::SuiteTest::SUITE}#{man}-manifest.jsonld"
256+
end +
257+
["#{Fixtures::SuiteTest::FRAME_SUITE}frame-manifest.jsonld"]
258+
end
256259

257260
earl_preamble(options) if options[:earl]
258261

0 commit comments

Comments
 (0)