You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2022/07/02 20:09:17 UTC

[jena] branch main updated: JENA-2335: Test for GH-1397 changes

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 658a987f2e JENA-2335: Test for GH-1397 changes
     new 4f84a97ef0 Merge pull request #1423 from afs/jena2335-opasquery
658a987f2e is described below

commit 658a987f2ee9135e2e3ccad7af852d7337b1f863
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Sat Jul 2 20:40:40 2022 +0100

    JENA-2335: Test for GH-1397 changes
---
 .../java/org/apache/jena/sparql/algebra/TestOpAsQuery.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/TestOpAsQuery.java b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/TestOpAsQuery.java
index 43b5e9ccc8..0004bcc172 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/TestOpAsQuery.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/TestOpAsQuery.java
@@ -78,10 +78,16 @@ public class TestOpAsQuery {
     @Test public void testBind11() { test_roundTripQuery("SELECT ?s ('y' AS ?y) ?p ?x ?o { ?s ?p ?o BIND ('x' AS ?x) }"); }
     @Test public void testBind12() { test_roundTripQuery("SELECT ?w ('y' AS ?y) ?x { BIND('w' AS ?w) ?s ?p ?o BIND ('x' AS ?x) }"); }
     @Test public void testBind13() { test_roundTripQuery("SELECT ('x' AS ?x) (str(?x) AS ?y) (str(?x) AS ?z) {}"); }
+    // Also reported: JENA-2335
+    @Test public void testBind14() {
+        test_roundTripQuery(
+                "SELECT ?a ?d WHERE { ?a <http://example.org/p> ?b . BIND(?b AS ?c) BIND(?c AS ?d) }",
+                "SELECT  ?a (?c AS ?d) WHERE { ?a  <http://example.org/p>  ?b  BIND(?b AS ?c)}");
+        }
 
     // https://github.com/apache/jena/issues/1397
-    @Test public void testBind14() { test_roundTripQuery("SELECT * { GRAPH ?g { BIND('x' AS ?x) } }"); }
-    @Test public void testBind15() { test_roundTripQuery("SELECT * { GRAPH ?g { BIND('x' AS ?x) BIND('y' AS ?y) } }"); }
+    @Test public void testBind15() { test_roundTripQuery("SELECT * { GRAPH ?g { BIND('x' AS ?x) } }"); }
+    @Test public void testBind16() { test_roundTripQuery("SELECT * { GRAPH ?g { BIND('x' AS ?x) BIND('y' AS ?y) } }"); }
 
     @Test public void testAssign1() { test_roundTripQuery("SELECT * { GRAPH ?g { LET(?y := ?x) } }", syntaxARQ); }
     @Test public void testAssign2() { test_roundTripQuery("SELECT * { GRAPH ?g { LET(?x := 'x') LET(?y := 'y') } }", syntaxARQ); }