You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2021/04/14 10:49:50 UTC
[sling-org-apache-sling-repoinit-parser] branch master updated
(3049bef -> 2c49f26)
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git.
from 3049bef SLING-10119 - add test for blank lines in properties
new 7bb53c9 SLING-10304 - add missing tests to test-99
new 2c49f26 SLING-10304 - explain how we document the language
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
README.md | 11 +++++++++++
.../apache/sling/repoinit/parser/test/ParsingErrorsTest.java | 3 +++
src/test/resources/testcases/test-99-output.txt | 7 ++++++-
src/test/resources/testcases/test-99.txt | 5 +++++
4 files changed, 25 insertions(+), 1 deletion(-)
[sling-org-apache-sling-repoinit-parser] 01/02: SLING-10304 - add
missing tests to test-99
Posted by bd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
commit 7bb53c977d861f0f9f75c7b1b6717f23ae4b32fa
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Apr 14 12:44:40 2021 +0200
SLING-10304 - add missing tests to test-99
---
.../org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java | 3 +++
src/test/resources/testcases/test-99-output.txt | 7 ++++++-
src/test/resources/testcases/test-99.txt | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java b/src/test/java/org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java
index 554a73f..2b3db6c 100644
--- a/src/test/java/org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java
+++ b/src/test/java/org/apache/sling/repoinit/parser/test/ParsingErrorsTest.java
@@ -119,6 +119,9 @@ public class ParsingErrorsTest {
add(new Object[] { "set properties on /pathA/b \n set {String} to missingPropertyName \n end", ParseException.class });
add(new Object[] { "set properties on /pathA/b \n set somepProp{String} withoutTo \n end", ParseException.class });
add(new Object[] { "set properties on /noPropsFails \n end", ParseException.class });
+
+ // SLING-6219 - delete user does not support lists
+ add(new Object[] { "delete user alice,bob", ParseException.class });
}};
return result;
}
diff --git a/src/test/resources/testcases/test-99-output.txt b/src/test/resources/testcases/test-99-output.txt
index f721235..d2f1d46 100644
--- a/src/test/resources/testcases/test-99-output.txt
+++ b/src/test/resources/testcases/test-99-output.txt
@@ -69,4 +69,9 @@ SetProperties on :authorizable:bob# :authorizable:grpB#/nested
PropertyLine default someInteger{Long}=[{Long}42]
PropertyLine someFlag{Boolean}=[{Boolean}true]
PropertyLine default someDate{Date}=[{GregorianCalendar}2020-03-19T11:39:33.437+05:30]
- PropertyLine quotedMix{String}=[{String}quoted, {String}non-quoted, {String}the last " one]
\ No newline at end of file
+ PropertyLine quotedMix{String}=[{String}quoted, {String}non-quoted, {String}the last " one]
+DeleteUser userA
+DeleteUser userB_listsAreNotSupported
+DeleteServiceUser svcA
+DeleteServiceUser svcB
+DeleteServiceUser svcC
\ No newline at end of file
diff --git a/src/test/resources/testcases/test-99.txt b/src/test/resources/testcases/test-99.txt
index d95637c..262de73 100644
--- a/src/test/resources/testcases/test-99.txt
+++ b/src/test/resources/testcases/test-99.txt
@@ -129,3 +129,8 @@ set properties on authorizable(bob), authorizable(grpB)/nested
set quotedMix to "quoted", non-quoted, "the last \" one"
end
+# Delete (service) users
+delete user userA
+delete user userB_listsAreNotSupported
+delete service user svcA
+delete service user svcB,svcC
\ No newline at end of file
[sling-org-apache-sling-repoinit-parser] 02/02: SLING-10304 -
explain how we document the language
Posted by bd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
commit 2c49f26d78d5dc71360e826988583c1034303dec
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Apr 14 12:49:35 2021 +0200
SLING-10304 - explain how we document the language
---
README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 3fa12d0..9a1cc8e 100644
--- a/README.md
+++ b/README.md
@@ -17,3 +17,14 @@ See the [Sling Website Repository Initialization page](https://sling.apache.org/
The [Feature Model Analyser](https://github.com/apache/sling-org-apache-sling-feature-analyser) uses this
module to validate repoinit statements embedded in feature models. It should be kept up to date with new
releases of this parser.
+
+## Documenting the language
+
+The [Sling Website Repository Initialization page](https://sling.apache.org/documentation/bundles/repository-initialization.html) describes
+the general repoinit principles and is meant to show examples of _all_ possible language constructs.
+
+To this end, we maintain a [test scenario that includes all those constructs](.src/test/resources/testcases/test-99.txt) as part of this module's unit tests, and
+slightly adapt that test's repoinit script for the documentation page.
+
+If adding new statements of options, please keep that `test-99` in sync so that it reflects the full language syntax, and update the
+documentation page accordingly.
\ No newline at end of file