From 26ee194c6cd69ed1e747e6ffe9fd9c4d96c712c7 Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Tue, 31 May 2022 16:08:32 +0200 Subject: [PATCH 1/3] Fix n3 syntax --- test/surface/concurrency.test.ts | 4 ++-- test/surface/create-non-container.test.ts | 8 ++++---- test/surface/update.test.ts | 24 +++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/surface/concurrency.test.ts b/test/surface/concurrency.test.ts index 4c521ce..813eaaf 100644 --- a/test/surface/concurrency.test.ts +++ b/test/surface/concurrency.test.ts @@ -164,8 +164,8 @@ if (process.env.SKIP_CONC) { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + ` solid:inserts { ${triple} .}.`, }); expectedRdf += `${triple}\n`; diff --git a/test/surface/create-non-container.test.ts b/test/surface/create-non-container.test.ts index c39e0d7..67d7b4d 100644 --- a/test/surface/create-non-container.test.ts +++ b/test/surface/create-non-container.test.ts @@ -195,8 +195,8 @@ describe("Create non-container", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:inserts { <#hello> <#linked> <#world> .}.", }); // console.log(result); @@ -357,8 +357,8 @@ describe("Create non-container", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:inserts { <#hello> <#linked> <#world> .}.", }); await new Promise((resolve) => setTimeout(resolve, 2000)); diff --git a/test/surface/update.test.ts b/test/surface/update.test.ts index 7bcadc6..ff309b0 100644 --- a/test/surface/update.test.ts +++ b/test/surface/update.test.ts @@ -251,8 +251,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:inserts { <#that> a <#fact> . }.", }); await new Promise((resolve) => setTimeout(resolve, waittime)); @@ -316,8 +316,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:deletes { <#hello> <#linked> <#world> .}." + " solid:inserts { <#hello> <#linked> <#world> .}.", }); @@ -382,8 +382,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:deletes { <#hello> <#linked> <#world> .}." + " solid:inserts { <#that> a <#fact> .}.", }); @@ -448,8 +448,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:deletes { <#something> <#completely> <#different> .}." + " solid:inserts { <#that> a <#fact> .}.", }); @@ -516,8 +516,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:deletes { <#hello> <#linked> <#world> .}.", }); }); @@ -573,8 +573,8 @@ describe("Update", () => { "Content-Type": "text/n3", }, body: - "@prefix solid: ." + - "#patch a solid:InsertDeletePatch;" + + "@prefix solid: .\n" + + "<#patch> a solid:InsertDeletePatch;\n" + " solid:deletes { <#something> <#completely> <#different> .}.", }); }); From 690ea1eaea95b1ac5c07f1f9d05c2a9847d228df Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Wed, 1 Jun 2022 12:54:59 +0200 Subject: [PATCH 2/3] More newlines --- test/surface/concurrency.test.ts | 2 +- test/surface/create-non-container.test.ts | 4 ++-- test/surface/update.test.ts | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/surface/concurrency.test.ts b/test/surface/concurrency.test.ts index 813eaaf..3118f78 100644 --- a/test/surface/concurrency.test.ts +++ b/test/surface/concurrency.test.ts @@ -166,7 +166,7 @@ if (process.env.SKIP_CONC) { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - ` solid:inserts { ${triple} .}.`, + ` solid:inserts { ${triple} .}.\n`, }); expectedRdf += `${triple}\n`; promises.push(promise); diff --git a/test/surface/create-non-container.test.ts b/test/surface/create-non-container.test.ts index 67d7b4d..32d049a 100644 --- a/test/surface/create-non-container.test.ts +++ b/test/surface/create-non-container.test.ts @@ -197,7 +197,7 @@ describe("Create non-container", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:inserts { <#hello> <#linked> <#world> .}.", + " solid:inserts { <#hello> <#linked> <#world> .}.\n", }); // console.log(result); await new Promise((resolve) => setTimeout(resolve, waittime)); @@ -359,7 +359,7 @@ describe("Create non-container", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:inserts { <#hello> <#linked> <#world> .}.", + " solid:inserts { <#hello> <#linked> <#world> .}.\n", }); await new Promise((resolve) => setTimeout(resolve, 2000)); }); diff --git a/test/surface/update.test.ts b/test/surface/update.test.ts index ff309b0..f0a76b0 100644 --- a/test/surface/update.test.ts +++ b/test/surface/update.test.ts @@ -253,7 +253,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:inserts { <#that> a <#fact> . }.", + " solid:inserts { <#that> a <#fact> . }.\n", }); await new Promise((resolve) => setTimeout(resolve, waittime)); }); @@ -318,8 +318,8 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#hello> <#linked> <#world> .}." + - " solid:inserts { <#hello> <#linked> <#world> .}.", + " solid:deletes { <#hello> <#linked> <#world> .}.\n" + + " solid:inserts { <#hello> <#linked> <#world> .}.\n", }); await new Promise((resolve) => setTimeout(resolve, waittime)); }); @@ -384,8 +384,8 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#hello> <#linked> <#world> .}." + - " solid:inserts { <#that> a <#fact> .}.", + " solid:deletes { <#hello> <#linked> <#world> .}.\n" + + " solid:inserts { <#that> a <#fact> .}.\n", }); await new Promise((resolve) => setTimeout(resolve, waittime)); }); @@ -450,8 +450,8 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#something> <#completely> <#different> .}." + - " solid:inserts { <#that> a <#fact> .}.", + " solid:deletes { <#something> <#completely> <#different> .}.\n" + + " solid:inserts { <#that> a <#fact> .}.\n", }); }); @@ -518,7 +518,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#hello> <#linked> <#world> .}.", + " solid:deletes { <#hello> <#linked> <#world> .}.\n", }); }); @@ -575,7 +575,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#something> <#completely> <#different> .}.", + " solid:deletes { <#something> <#completely> <#different> .}.\n", }); }); From 85d56089602225c1e37a8115dae0c5fd4cafaf91 Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Wed, 1 Jun 2022 13:01:24 +0200 Subject: [PATCH 3/3] Fix . before EOF --- test/surface/update.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/surface/update.test.ts b/test/surface/update.test.ts index f0a76b0..662794c 100644 --- a/test/surface/update.test.ts +++ b/test/surface/update.test.ts @@ -318,7 +318,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#hello> <#linked> <#world> .}.\n" + + " solid:deletes { <#hello> <#linked> <#world> .};\n" + " solid:inserts { <#hello> <#linked> <#world> .}.\n", }); await new Promise((resolve) => setTimeout(resolve, waittime)); @@ -384,7 +384,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#hello> <#linked> <#world> .}.\n" + + " solid:deletes { <#hello> <#linked> <#world> .};\n" + " solid:inserts { <#that> a <#fact> .}.\n", }); await new Promise((resolve) => setTimeout(resolve, waittime)); @@ -450,7 +450,7 @@ describe("Update", () => { body: "@prefix solid: .\n" + "<#patch> a solid:InsertDeletePatch;\n" + - " solid:deletes { <#something> <#completely> <#different> .}.\n" + + " solid:deletes { <#something> <#completely> <#different> .};\n" + " solid:inserts { <#that> a <#fact> .}.\n", }); });