Closed lukaseder closed 1 year ago
It looks like the actual Cypher is correct, but the expected Cypher is wrong.
This patch would fix it on my machine:
diff --git a/src/test/java/org/neo4j/sql2cypher/SQLToCypherTest.java b/src/test/java/org/neo4j/sql2cypher/SQLToCypherTest.java
index e630aeb..1817898 100644
--- a/src/test/java/org/neo4j/sql2cypher/SQLToCypherTest.java
+++ b/src/test/java/org/neo4j/sql2cypher/SQLToCypherTest.java
@@ -89,8 +89,8 @@ class SQLToCypherTest {
.filter(b -> "sql".equals(b.getAttribute("language")))
.map(sqlBlock -> {
var name = (String) sqlBlock.getAttribute("name");
- var sql = String.join(System.lineSeparator(), sqlBlock.getLines());
- var cypher = String.join(System.lineSeparator(), blocks.get(sqlBlock.getId() + "_expected").getLines());
+ var sql = String.join("\n", sqlBlock.getLines());
+ var cypher = String.join("\n", blocks.get(sqlBlock.getId() + "_expected").getLines());
Map<String, String> tableMappings = new HashMap<>();
if (sqlBlock.getAttribute("table_mappings") != null) {
tableMappings = Arrays.stream(((String) sqlBlock.getAttribute("table_mappings")).split(","))
Any objections?
I've pushed this change for now. Please let me know if this works for you.
Works on macOS, thanks and sorry. Closed with 5525ea6.
I'm getting errors like this:
Will look into it