Commits

Toby Inkster committed 89a5bfd

three new test cases on term expansion to URIs

Comments (0)

Files changed (7)

test-suite/manifest.ttl

+@base         <http://buzzword.org.uk/2011/Atom_plus_RDFa/test-suite/manifest> .
 @prefix dc:   <http://purl.org/dc/terms/> .
 @prefix log:  <http://www.w3.org/2000/10/swap/log#> .
 @prefix owl:  <http://www.w3.org/2002/07/owl#> .
 @prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
 @prefix toby: <http://tobyinkster.co.uk/#> .
 
-<test-cases/9001>
+<tests/9001>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Simple triple";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9001.atom>;
-	test:informationResourceResults <test-cases/9001.sparql>;
+	test:informationResourceInput <tests/9001.atom>;
+	test:informationResourceResults <tests/9001.sparql>;
 	test:purpose "Simple triple using CURIEs, Safe CURIEs and a resource object.";
 	test:specificationReference "" .
 
-<test-cases/9002>
+<tests/9002>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Simple triple, RDFa 1.1 only";
 	rdfatest:rdfaVersion "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9002.atom>;
-	test:informationResourceResults <test-cases/9002.sparql>;
+	test:informationResourceInput <tests/9002.atom>;
+	test:informationResourceResults <tests/9002.sparql>;
 	test:purpose "Tests non-Safe CURIEs in @about and @resource.";
 	test:specificationReference "" .
 
-<test-cases/9003>
+<tests/9003>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Default subject for root element.";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9003.atom>;
-	test:informationResourceResults <test-cases/9003.sparql>;
+	test:informationResourceInput <tests/9003.atom>;
+	test:informationResourceResults <tests/9003.sparql>;
 	test:purpose "Tests that the implicit subject resource for the root element is the base URI.";
 	test:specificationReference "" .
 
-<test-cases/9004>
+<tests/9004>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Default subject for entry elements.";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9004.atom>;
-	test:informationResourceResults <test-cases/9004.sparql>;
+	test:informationResourceInput <tests/9004.atom>;
+	test:informationResourceResults <tests/9004.sparql>;
 	test:purpose "Tests that entry elements are bnodes.";
 	test:specificationReference "" .
 
-<test-cases/9005>
+<tests/9005>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Default subjects.";
 	test:classification test:required;
 	test:expectedResults "false"^^xsd:boolean;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9005.atom>;
-	test:informationResourceResults <test-cases/9005.sparql>;
+	test:informationResourceInput <tests/9005.atom>;
+	test:informationResourceResults <tests/9005.sparql>;
 	test:purpose "Tests that feed and entry elements create different subjects.";
 	test:specificationReference "" .
 
-<test-cases/9006>
+<tests/9006>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "Default subject for entry elements.";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9006.atom>;
-	test:informationResourceResults <test-cases/9006.sparql>;
+	test:informationResourceInput <tests/9006.atom>;
+	test:informationResourceResults <tests/9006.sparql>;
 	test:purpose "Tests that two entry elements are distinct bnodes.";
 	test:specificationReference "" .
 
-<test-cases/9007>
+<tests/9007>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "xml:base";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9007.atom>;
-	test:informationResourceResults <test-cases/9007.sparql>;
+	test:informationResourceInput <tests/9007.atom>;
+	test:informationResourceResults <tests/9007.sparql>;
 	test:purpose "Checks that xml:base sets the base URI.";
 	test:specificationReference "" .
 
-<test-cases/9008>
+<tests/9008>
 	a test:TestCase;
 	dc:contributor toby:i ;
 	dc:title "xml:lang";
 	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
 	test:classification test:required;
 	rdfatest:hostLanguage "atom", "datarss";
-	test:informationResourceInput <test-cases/9008.atom>;
-	test:informationResourceResults <test-cases/9008.sparql>;
+	test:informationResourceInput <tests/9008.atom>;
+	test:informationResourceResults <tests/9008.sparql>;
 	test:purpose "Checks that xml:lang sets the language.";
 	test:specificationReference "" .
 
+<tests/9009>
+	a test:TestCase;
+	dc:contributor toby:i ;
+	dc:title "IETF rel registry";
+	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
+	test:classification test:required;
+	rdfatest:hostLanguage "atom", "datarss";
+	test:informationResourceInput <tests/9009.atom>;
+	test:informationResourceResults <tests/9009.sparql>;
+	test:purpose "Checks that terms from the IETF registry (as of May 2012) are expanded to the correct URIs.";
+	test:specificationReference "" .
 
-# TODO: a test that includes rel="$_" foreach term in the IETF registry,
-# and makes sure it is expanded to the correct URI
+<tests/9010>
+	a test:TestCase;
+	dc:contributor toby:i ;
+	dc:title "Unknown terms";
+	rdfatest:rdfaVersion "rdfa1.0", "rdfa1.1";
+	test:classification test:required;
+	rdfatest:hostLanguage "atom", "datarss";
+	test:informationResourceInput <tests/9010.atom>;
+	test:informationResourceResults <tests/9010.sparql>;
+	test:purpose "Checks that unknown terms are expanded as if they were terms from the IETF registry.";
+	test:specificationReference "" .
 
-# TODO: a test that includes rel="$_" foreach term in the XHTML vocab,
-# and makes sure it is expanded to the correct URI (i.e. the IETF URI!)
-
-# TODO: a test that includes rel="monkey-madness" and checks it's
-# expanded to the correct URI.
+<tests/9011>
+	a test:TestCase;
+	dc:contributor toby:i ;
+	dc:title "Unknown terms";
+	rdfatest:rdfaVersion "rdfa1.1";
+	test:classification test:required;
+	rdfatest:hostLanguage "atom", "datarss";
+	test:informationResourceInput <tests/9011.atom>;
+	test:informationResourceResults <tests/9011.sparql>;
+	test:purpose "Default vocabulary \"wins\" over terms defined by RDFa Core and XHTML+RDFa.";
+	rdfs:comment "Not 100% sure what should happen in the case of RDFa 1.0, so this is just an RDFa 1.1 test.";
+	test:specificationReference "" .
 
 # TODO: a test that includes rel="$_:x" foreach prefix in RDFa Core 1.1
 # and checks prefixes are defined
 
+# TODO: a test that includes rel="$_:x" foreach prefix in DataRSS
+# and checks prefixes are defined (in DataRSS test suite only!)
+
 # TODO: check to see if an Atom+RDFa parser should be expected to additionally
-# pass all current tests from the XML+RDFa test suite. (It probably should.)
+# pass all current tests from the XML+RDFa test suite. (It probably should.)

test-suite/tests/9009.atom

+<feed
+	xmlns="http://www.w3.org/2005/Atom"
+	xmlns:rdfa="http://www.w3.org/ns/rdfa#"
+	xmlns:ex="http://www.example.com/"
+>
+	<title>Example Feed</title>
+	<link href="http://example.org/"/>
+	<updated>2003-12-13T18:30:02Z</updated>
+	<author>
+		<name>John Doe</name>
+	</author>
+	<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
+	<entry xml:base="http://www.example.com/">
+		<title>Atom-Powered Robots Run Amok</title>
+		<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
+		<updated>2003-12-13T18:30:02Z</updated>
+		<summary>Some text.</summary>
+		<link rel="alternate" href="alternate"/>
+		<link rel="appendix" href="appendix"/>
+		<link rel="archives" href="archives"/>
+		<link rel="author" href="author"/>
+		<link rel="bookmark" href="bookmark"/>
+		<link rel="canonical" href="canonical"/>
+		<link rel="chapter" href="chapter"/>
+		<link rel="collection" href="collection"/>
+		<link rel="contents" href="contents"/>
+		<link rel="copyright" href="copyright"/>
+		<link rel="current" href="current"/>
+		<link rel="describedby" href="describedby"/>
+		<link rel="disclosure" href="disclosure"/>
+		<link rel="duplicate" href="duplicate"/>
+		<link rel="edit" href="edit"/>
+		<link rel="edit-media" href="edit-media"/>
+		<link rel="enclosure" href="enclosure"/>
+		<link rel="first" href="first"/>
+		<link rel="glossary" href="glossary"/>
+		<link rel="help" href="help"/>
+		<link rel="hub" href="hub"/>
+		<link rel="icon" href="icon"/>
+		<link rel="index" href="index"/>
+		<link rel="item" href="item"/>
+		<link rel="last" href="last"/>
+		<link rel="latest-version" href="latest-version"/>
+		<link rel="license" href="license"/>
+		<link rel="lrdd" href="lrdd"/>
+		<link rel="monitor" href="monitor"/>
+		<link rel="monitor-group" href="monitor-group"/>
+		<link rel="next" href="next"/>
+		<link rel="next-archive" href="next-archive"/>
+		<link rel="nofollow" href="nofollow"/>
+		<link rel="noreferrer" href="noreferrer"/>
+		<link rel="payment" href="payment"/>
+		<link rel="predecessor-version" href="predecessor-version"/>
+		<link rel="prefetch" href="prefetch"/>
+		<link rel="prev" href="prev"/>
+		<link rel="previous" href="previous"/>
+		<link rel="prev-archive" href="prev-archive"/>
+		<link rel="related" href="related"/>
+		<link rel="replies" href="replies"/>
+		<link rel="search" href="search"/>
+		<link rel="section" href="section"/>
+		<link rel="self" href="self"/>
+		<link rel="service" href="service"/>
+		<link rel="start" href="start"/>
+		<link rel="stylesheet" href="stylesheet"/>
+		<link rel="subsection" href="subsection"/>
+		<link rel="successor-version" href="successor-version"/>
+		<link rel="tag" href="tag"/>
+		<link rel="up" href="up"/>
+		<link rel="version-history" href="version-history"/>
+		<link rel="via" href="via"/>
+		<link rel="working-copy" href="working-copy"/>
+		<link rel="working-copy-of" href="working-copy-of"/>
+	</entry>
+</feed>

test-suite/tests/9009.sparql

+PREFIX ex: <http://www.example.com/>
+PREFIX rel: <http://www.iana.org/assignments/relation/>
+
+ASK WHERE {
+	?s rel:alternate ex:alternate .
+	?s rel:appendix ex:appendix .
+	?s rel:archives ex:archives .
+	?s rel:author ex:author .
+	?s rel:bookmark ex:bookmark .
+	?s rel:canonical ex:canonical .
+	?s rel:chapter ex:chapter .
+	?s rel:collection ex:collection .
+	?s rel:contents ex:contents .
+	?s rel:copyright ex:copyright .
+	?s rel:current ex:current .
+	?s rel:describedby ex:describedby .
+	?s rel:disclosure ex:disclosure .
+	?s rel:duplicate ex:duplicate .
+	?s rel:edit ex:edit .
+	?s rel:edit-media ex:edit-media .
+	?s rel:enclosure ex:enclosure .
+	?s rel:first ex:first .
+	?s rel:glossary ex:glossary .
+	?s rel:help ex:help .
+	?s rel:hub ex:hub .
+	?s rel:icon ex:icon .
+	?s rel:index ex:index .
+	?s rel:item ex:item .
+	?s rel:last ex:last .
+	?s rel:latest-version ex:latest-version .
+	?s rel:license ex:license .
+	?s rel:lrdd ex:lrdd .
+	?s rel:monitor ex:monitor .
+	?s rel:monitor-group ex:monitor-group .
+	?s rel:next ex:next .
+	?s rel:next-archive ex:next-archive .
+	?s rel:nofollow ex:nofollow .
+	?s rel:noreferrer ex:noreferrer .
+	?s rel:payment ex:payment .
+	?s rel:predecessor-version ex:predecessor-version .
+	?s rel:prefetch ex:prefetch .
+	?s rel:prev ex:prev .
+	?s rel:previous ex:previous .
+	?s rel:prev-archive ex:prev-archive .
+	?s rel:related ex:related .
+	?s rel:replies ex:replies .
+	?s rel:search ex:search .
+	?s rel:section ex:section .
+	?s rel:self ex:self .
+	?s rel:service ex:service .
+	?s rel:start ex:start .
+	?s rel:stylesheet ex:stylesheet .
+	?s rel:subsection ex:subsection .
+	?s rel:successor-version ex:successor-version .
+	?s rel:tag ex:tag .
+	?s rel:up ex:up .
+	?s rel:version-history ex:version-history .
+	?s rel:via ex:via .
+	?s rel:working-copy ex:working-copy .
+	?s rel:working-copy-of ex:working-copy-of .
+}

test-suite/tests/9010.atom

+<feed
+	xmlns="http://www.w3.org/2005/Atom"
+	xmlns:rdfa="http://www.w3.org/ns/rdfa#"
+	xmlns:ex="http://www.example.com/"
+>
+	<title>Example Feed</title>
+	<link href="http://example.org/"/>
+	<updated>2003-12-13T18:30:02Z</updated>
+	<author>
+		<name>John Doe</name>
+	</author>
+	<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
+	<entry xml:base="http://www.example.com/">
+		<title>Atom-Powered Robots Run Amok</title>
+		<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
+		<updated>2003-12-13T18:30:02Z</updated>
+		<summary>Some text.</summary>
+		<link rel="monkey-madness" href="monkey-madness"/>
+	</entry>
+</feed>

test-suite/tests/9010.sparql

+PREFIX ex: <http://www.example.com/>
+PREFIX rel: <http://www.iana.org/assignments/relation/>
+
+ASK WHERE {
+	?s rel:monkey-madness ex:monkey-madness .
+}

test-suite/tests/9011.atom

+<feed
+	xmlns="http://www.w3.org/2005/Atom"
+	xmlns:rdfa="http://www.w3.org/ns/rdfa#"
+	xmlns:ex="http://www.example.com/"
+>
+	<title>Example Feed</title>
+	<link href="http://example.org/"/>
+	<updated>2003-12-13T18:30:02Z</updated>
+	<author>
+		<name>John Doe</name>
+	</author>
+	<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
+	<entry xml:base="http://www.example.com/">
+		<title>Atom-Powered Robots Run Amok</title>
+		<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
+		<updated>2003-12-13T18:30:02Z</updated>
+		<summary>Some text.</summary>
+		<link rel="alternate" href="alternate" />
+		<link rel="appendix" href="appendix" />
+		<link rel="cite" href="cite" />
+		<link rel="bookmark" href="bookmark" />
+		<link rel="contents" href="contents" />
+		<link rel="chapter" href="chapter" />
+		<link rel="copyright" href="copyright" />
+		<link rel="first" href="first" />
+		<link rel="glossary" href="glossary" />
+		<link rel="help" href="help" />
+		<link rel="icon" href="icon" />
+		<link rel="index" href="index" />
+		<link rel="last" href="last" />
+		<link rel="license" href="license" />
+		<link rel="meta" href="meta" />
+		<link rel="next" href="next" />
+		<link rel="prev" href="prev" />
+		<link rel="previous" href="previous" />
+		<link rel="section" href="section" />
+		<link rel="start" href="start" />
+		<link rel="stylesheet" href="stylesheet" />
+		<link rel="subsection" href="subsection" />
+		<link rel="top" href="top" />
+		<link rel="up" href="up" />
+		<link rel="p3pv1" href="p3pv1" />
+		<link rel="role" href="role" />
+		<link rel="describedby" href="describedby" />
+	</entry>
+</feed>

test-suite/tests/9011.sparql

+PREFIX ex: <http://www.example.com/>
+PREFIX rel: <http://www.iana.org/assignments/relation/>
+ASK WHERE {
+	?s rel:alternate ex:alternate .
+	?s rel:appendix ex:appendix .
+	?s rel:cite ex:cite .
+	?s rel:bookmark ex:bookmark .
+	?s rel:contents ex:contents .
+	?s rel:chapter ex:chapter .
+	?s rel:copyright ex:copyright .
+	?s rel:first ex:first .
+	?s rel:glossary ex:glossary .
+	?s rel:help ex:help .
+	?s rel:icon ex:icon .
+	?s rel:index ex:index .
+	?s rel:last ex:last .
+	?s rel:license ex:license .
+	?s rel:meta ex:meta .
+	?s rel:next ex:next .
+	?s rel:prev ex:prev .
+	?s rel:previous ex:previous .
+	?s rel:section ex:section .
+	?s rel:start ex:start .
+	?s rel:stylesheet ex:stylesheet .
+	?s rel:subsection ex:subsection .
+	?s rel:top ex:top .
+	?s rel:up ex:up .
+	?s rel:p3pv1 ex:p3pv1 .
+	?s rel:role ex:role .
+	?s rel:describedby ex:describedby .
+}