Skip to content

Commit a363c1b

Browse files
committed
Add N-Triples tests for ill-formed language-tagged literals and directional variations.
1 parent 409762d commit a363c1b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

spec/ntriples_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,18 @@
569569
end
570570
end
571571
end
572+
573+
{
574+
"language with ill-formted tag" => '<http://subj> <http://pred> "Hello"@--ltr',
575+
"direction without language" => '<http://subj> <http://pred> "Hello"@e',
576+
"bad direction" => '<http://subj> <http://pred> "Hello"@en--RTL'
577+
}.each_pair do |name, triple|
578+
it name do
579+
expect do
580+
reader.new(triple, rdfstar: true, validate: true).first
581+
end.to raise_error(RDF::ReaderError)
582+
end
583+
end
572584
end
573585

574586
it "warns if version is not 1.2 or 1.2-basic" do

0 commit comments

Comments
 (0)