jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [28/50] [abbrv] jena git commit: modify syn-arq.sh to generate syntax tests for construct quad
Date Mon, 17 Aug 2015 15:10:07 GMT
modify syn-arq.sh to generate syntax tests for construct quad

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/4bb4a7f2
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/4bb4a7f2
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/4bb4a7f2

Branch: refs/heads/JENA-491-construct-quads
Commit: 4bb4a7f21eded96854d262118821980e0e8ea2c6
Parents: 84f6f98
Author: confidencesun <confidence.sun@gmail.com>
Authored: Thu Aug 6 01:49:58 2015 +0800
Committer: confidencesun <confidence.sun@gmail.com>
Committed: Thu Aug 6 01:49:58 2015 +0800

----------------------------------------------------------------------
 .../constructquads/ExampleConstructQuads.java   |  1 -
 .../testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl  | 69 +++++++++++-----
 .../Syntax-ARQ/syntax-quad-construct-04.arq     |  1 -
 .../Syntax-ARQ/syntax-quad-construct-05.arq     |  1 -
 .../Syntax-ARQ/syntax-quad-construct-06.arq     |  1 -
 .../Syntax-ARQ/syntax-quad-construct-07.arq     |  1 -
 .../Syntax-ARQ/syntax-quad-construct-08.arq     |  1 -
 jena-arq/testing/ARQ/Syntax/syn-arq.sh          | 82 +++++++++++++++++++-
 8 files changed, 132 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java
----------------------------------------------------------------------
diff --git a/jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java
b/jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java
index 5b4efd6..0f509b0 100644
--- a/jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java
+++ b/jena-arq/src-examples/arq/examples/constructquads/ExampleConstructQuads.java
@@ -165,7 +165,6 @@ public class ExampleConstructQuads {
 		File[] tests = new File("testing/ARQ/Syntax/Syntax-ARQ")
 				.listFiles(new FilenameFilter() {
 					public boolean accept(File dir, String fname) {
-						System.out.println(fname);
 						if (fname.startsWith("syntax-quad-construct-")) {
 							return true;
 						}

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl
index 8d98238..3478a61 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/manifest.ttl
@@ -1,18 +1,3 @@
-#  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.
-
 @prefix :       <manifest#> .
 @prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 @prefix rdfs:	<http://www.w3.org/2000/01/rdf-schema#> .
@@ -51,6 +36,14 @@
 :test_23
 :test_24
 :test_25
+:test_26
+:test_27
+:test_28
+:test_29
+:test_30
+:test_31
+:test_32
+:test_33
 ) .
 
 :test_1 rdf:type   mfx:PositiveSyntaxTestARQ ;
@@ -163,17 +156,57 @@
    mf:name    "syntax-let-02.arq" ;
    mf:action  <syntax-let-02.arq> ;.
 
-:test_23 rdf:type   mfx:NegativeSyntaxTestARQ ;
+:test_23 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-01.arq" ;
+   mf:action  <syntax-quad-construct-01.arq> ;.
+
+:test_24 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-02.arq" ;
+   mf:action  <syntax-quad-construct-02.arq> ;.
+
+:test_25 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-03.arq" ;
+   mf:action  <syntax-quad-construct-03.arq> ;.
+
+:test_26 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-04.arq" ;
+   mf:action  <syntax-quad-construct-04.arq> ;.
+
+:test_27 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-05.arq" ;
+   mf:action  <syntax-quad-construct-05.arq> ;.
+
+:test_28 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-06.arq" ;
+   mf:action  <syntax-quad-construct-06.arq> ;.
+
+:test_29 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-07.arq" ;
+   mf:action  <syntax-quad-construct-07.arq> ;.
+
+:test_30 rdf:type   mfx:PositiveSyntaxTestARQ ;
+   dawgt:approval dawgt:NotClassified ;
+   mf:name    "syntax-quad-construct-08.arq" ;
+   mf:action  <syntax-quad-construct-08.arq> ;.
+
+:test_31 rdf:type   mfx:NegativeSyntaxTestARQ ;
    dawgt:approval dawgt:NotClassified ;
    mf:name    "syntax-subquery-bad-01.arq" ;
    mf:action  <syntax-subquery-bad-01.arq> ;.
 
-:test_24 rdf:type   mfx:NegativeSyntaxTestARQ ;
+:test_32 rdf:type   mfx:NegativeSyntaxTestARQ ;
    dawgt:approval dawgt:NotClassified ;
    mf:name    "syntax-subquery-bad-02.arq" ;
    mf:action  <syntax-subquery-bad-02.arq> ;.
 
-:test_25 rdf:type   mfx:NegativeSyntaxTestARQ ;
+:test_33 rdf:type   mfx:NegativeSyntaxTestARQ ;
    dawgt:approval dawgt:NotClassified ;
    mf:name    "syntax-let-bad-01.arq" ;
    mf:action  <syntax-let-bad-01.arq> ;.

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-04.arq
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-04.arq b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-04.arq
index 7638a43..521d182 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-04.arq
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-04.arq
@@ -6,4 +6,3 @@ CONSTRUCT {
    }
 WHERE
    { GRAPH ?g { ?s ?p ?o } }
-

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-05.arq
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-05.arq b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-05.arq
index d9b1bda..de726b4 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-05.arq
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-05.arq
@@ -6,4 +6,3 @@ CONSTRUCT {
    }
 WHERE
    { GRAPH ?g { ?s ?p ?o } }
-

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-06.arq
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-06.arq b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-06.arq
index d6b11bb..98ef396 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-06.arq
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-06.arq
@@ -11,4 +11,3 @@ CONSTRUCT {
    }
 WHERE
    { GRAPH ?g { ?s ?p ?o } }
-

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-07.arq
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-07.arq b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-07.arq
index 19fe948..54a6630 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-07.arq
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-07.arq
@@ -4,4 +4,3 @@ CONSTRUCT {
    GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
    }
 WHERE {}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-08.arq
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-08.arq b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-08.arq
index 602e81c..0393ecd 100644
--- a/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-08.arq
+++ b/jena-arq/testing/ARQ/Syntax/Syntax-ARQ/syntax-quad-construct-08.arq
@@ -6,4 +6,3 @@ CONSTRUCT {
    }
 WHERE
    { }
-

http://git-wip-us.apache.org/repos/asf/jena/blob/4bb4a7f2/jena-arq/testing/ARQ/Syntax/syn-arq.sh
----------------------------------------------------------------------
diff --git a/jena-arq/testing/ARQ/Syntax/syn-arq.sh b/jena-arq/testing/ARQ/Syntax/syn-arq.sh
index 3f8bce5..508d29b 100644
--- a/jena-arq/testing/ARQ/Syntax/syn-arq.sh
+++ b/jena-arq/testing/ARQ/Syntax/syn-arq.sh
@@ -184,4 +184,84 @@ SELECT *
 {
   LET ?x := (4+5)
 }
-EOF
\ No newline at end of file
+EOF
+
+## ---- CONSTRUCT QUAD
+
+N=0
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT { GRAPH :g { :s :p :o } } WHERE {}
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT { GRAPH ?g { ?s ?p ?o } } WHERE { ?s ?p ?o }
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT { :s :p :o } WHERE {}
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT {
+   GRAPH ?g { :s :p :o }
+   ?s ?p ?o
+   }
+WHERE
+   { GRAPH ?g { ?s ?p ?o } }
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT {
+   ?s ?p ?o
+   GRAPH ?g { :s :p :o }
+   }
+WHERE
+   { GRAPH ?g { ?s ?p ?o } }
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT {
+   GRAPH ?g { :s :p :o }
+   ?s ?p ?o .
+   ?s ?p ?o .
+   GRAPH ?g { ?s ?p ?o }
+   ?s ?p ?o .
+   ?s ?p ?o
+   GRAPH ?g { ?s ?p ?o }
+   }
+WHERE
+   { GRAPH ?g { ?s ?p ?o } }
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT {
+   GRAPH <urn:x-arq:DefaultGraphNode> {:s :p :o .}
+   }
+WHERE {}
+EOF
+
+N=$((N+1)) ; testGood $ARQ $(fname "syntax-quad-construct-" $N arq) <<EOF
+PREFIX : <http://example/>
+
+CONSTRUCT {
+   GRAPH ?g { :s :p :o }
+   GRAPH ?g1 { :s :p :o }
+   }
+WHERE
+   { }
+EOF


Mime
View raw message