ANY23-237 added test case to ensure no regression
authorHans <firedrake93@gmail.com>
Fri, 13 Apr 2018 13:25:04 +0000 (08:25 -0500)
committerHans <firedrake93@gmail.com>
Fri, 13 Apr 2018 13:25:04 +0000 (08:25 -0500)
core/src/test/java/org/apache/any23/extractor/rdfa/RDFa11ExtractorTest.java
core/src/test/java/org/apache/any23/extractor/rdfa/RDFaExtractorTest.java
test-resources/src/test/resources/html/rdfa/0087.xhtml [new file with mode: 0644]

index c0767c9..7849f50 100644 (file)
@@ -71,6 +71,14 @@ public class RDFa11ExtractorTest extends AbstractRDFaExtractorTestCase {
     }
 
     @Test
+    public void test0087() {
+        assertExtract("/html/rdfa/0087.xhtml");
+        assertModelNotEmpty();
+        assertStatementsSize(null, null, null, 24);
+        assertContains(RDFUtils.iri("http://www.w3.org/1999/xhtml/vocab#stylesheet"), RDFUtils.iri("http://example.org/stylesheet"));
+    }
+
+    @Test
     public void testIssue326() {
         assertExtract("/html/rdfa/rdfa-issue326-and-267.html");
     }
index 680fe47..0ca6f0f 100644 (file)
@@ -38,10 +38,10 @@ public class RDFaExtractorTest extends AbstractRDFaExtractorTestCase {
      * It checks if the extraction is the same when the namespaces are defined in <i>RDFa1.0</i> or
      * <i>RDFa1.1</i> respectively.
      *
-     * @throws org.openrdf.repository.RepositoryException
+     * @throws org.eclipse.rdf4j.repository.RepositoryException
      * @throws java.io.IOException
-     * @throws org.openrdf.rio.RDFHandlerException
-     * @throws org.openrdf.rio.RDFParseException
+     * @throws org.eclipse.rdf4j.rio.RDFHandlerException
+     * @throws org.eclipse.rdf4j.rio.RDFParseException
      */
     @Test
     public void testRDFa11PrefixBackwardCompatibility()
diff --git a/test-resources/src/test/resources/html/rdfa/0087.xhtml b/test-resources/src/test/resources/html/rdfa/0087.xhtml
new file mode 100644 (file)
index 0000000..ff8de08
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--  Test 0087+xhtml1 from http://rdfa.info/test-suite/ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.1">
+<head>
+    <title>Test 0087</title>
+</head>
+<body>
+<p>
+    <a rel=":alternate" href="http://example.org/alternate">alternate</a>
+    <a rel=":appendix" href="http://example.org/appendix">appendix</a>
+    <a rel=":bookmark" href="http://example.org/bookmark">bookmark</a>
+    <a rel=":cite" href="http://example.org/cite">cite</a>
+    <a rel=":chapter" href="http://example.org/chapter">chapter</a>
+    <a rel=":contents" href="http://example.org/contents">contents</a>
+    <a rel=":copyright" href="http://example.org/copyright">copyright</a>
+    <a rel=":glossary" href="http://example.org/glossary">glossary</a>
+    <a rel=":help" href="http://example.org/help">help</a>
+    <a rel=":icon" href="http://example.org/icon">icon</a>
+    <a rel=":index" href="http://example.org/index">index</a>
+    <a rel=":first" href="http://example.org/first">first</a>
+    <a rel=":last" href="http://example.org/last">last</a>
+    <a rel=":license" href="http://example.org/license">license</a>
+    <a rel=":meta" href="http://example.org/meta">meta</a>
+    <a rel=":next" href="http://example.org/next">next</a>
+    <a rel=":p3pv1" href="http://example.org/p3pv1">p3pv1</a>
+    <a rel=":prev" href="http://example.org/prev">prev</a>
+    <a rel=":role" href="http://example.org/role">role</a>
+    <a rel=":section" href="http://example.org/section">section</a>
+    <a rel=":subsection" href="http://example.org/subsection">subsection</a>
+    <a rel=":start" href="http://example.org/start">start</a>
+    <a rel=":stylesheet" href="http://example.org/stylesheet">stylesheet</a>
+    <a rel=":up" href="http://example.org/up">up</a>
+</p>
+</body>
+</html>
\ No newline at end of file