You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ki...@apache.org on 2018/12/29 21:52:38 UTC

[jena] 03/03: JENA-204: add unit tests

This is an automated email from the ASF dual-hosted git repository.

kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jena.git

commit 458c232b1ef077b5fbe79684ca911f4bd5274cd5
Author: Bruno P. Kinoshita <ki...@apache.org>
AuthorDate: Sat Dec 29 20:06:16 2018 +1300

    JENA-204: add unit tests
---
 .../src/test/java/jena/cmd/Test_schemagen.java     | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/jena-cmds/src/test/java/jena/cmd/Test_schemagen.java b/jena-cmds/src/test/java/jena/cmd/Test_schemagen.java
index c31ba20..ff65b56 100644
--- a/jena-cmds/src/test/java/jena/cmd/Test_schemagen.java
+++ b/jena-cmds/src/test/java/jena/cmd/Test_schemagen.java
@@ -304,6 +304,46 @@ public class Test_schemagen
                              new String[] {} );
     }
 
+    /**
+     * A comment in a certain language. But no language specified in schemagen.
+     */
+    @Test
+    public void testComment4() throws Exception {
+        String SOURCE = PREFIX + "ex:A a owl:Class ; rdfs:comment \"comentario\"@pt .";
+        testSchemagenOutput( SOURCE, null,
+                new String[] {"-a", "http://example.com/sg#", "--owl"},
+                new String[] {" */\\*\\* <p>comentario</p> \\*/ *"},
+                new String[] {} );
+    }
+
+    /**
+     * Comments in certain languages. A different language specified in schemagen.
+     */
+    @Test
+    public void testComment5() throws Exception {
+        String SOURCE = PREFIX + "ex:A a owl:Class ; rdfs:comment \"comentario\"@pt ; rdfs:comment \"comment\"@en .";
+        testSchemagenOutput( SOURCE, null,
+                new String[] {"-l", "es", "-a", "http://example.com/sg#", "--owl"},
+                new String[] {},
+                new String[] {" */\\*\\* <p>comment</p> \\*/ *"} );
+        testSchemagenOutput( SOURCE, null,
+                new String[] {"-l", "es", "-a", "http://example.com/sg#", "--owl"},
+                new String[] {},
+                new String[] {" */\\*\\* <p>comentario</p> \\*/ *"} );
+    }
+
+    /**
+     * Comments in certain languages. One of these languages specified in schemagen.
+     */
+    @Test
+    public void testComment6() throws Exception {
+        String SOURCE = PREFIX + "ex:A a owl:Class ; rdfs:comment \"comentario\"@pt ; rdfs:comment \"comment\"@en .";
+        testSchemagenOutput( SOURCE, null,
+                new String[] {"-l", "pt", "-a", "http://example.com/sg#", "--owl"},
+                new String[] {" */\\*\\* <p>comentario</p> \\*/ *"},
+                new String[] {} );
+    }
+
     @Test
     public void testOntClass0() throws Exception {
         String SOURCE = PREFIX + "ex:A a owl:Class .";