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 2020/03/25 12:11:16 UTC

[sling-org-apache-sling-repoinit-parser] branch master updated: SLING-9171 - add examples to test-99 and increase language version

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


The following commit(s) were added to refs/heads/master by this push:
     new 0b68b68  SLING-9171 - add examples to test-99 and increase language version
0b68b68 is described below

commit 0b68b68795cad2d211dc9fc8c1e8ad76ac07cdd7
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Mar 25 13:11:02 2020 +0100

    SLING-9171 - add examples to test-99 and increase language version
---
 bnd.bnd                                         |  2 +-
 src/test/resources/testcases/test-99-output.txt |  8 +++++++-
 src/test/resources/testcases/test-99.txt        | 12 ++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
index dbff4b6..39e43ec 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -3,4 +3,4 @@
 -includeresource:\
   @jackrabbit-jcr-commons-*.jar!/org/apache/jackrabbit/util/ISO8601.*
 
-Provide-Capability: org.apache.sling.repoinit.language;version:Version="8.0"
\ No newline at end of file
+Provide-Capability: org.apache.sling.repoinit.language;version:Version="8.1"
\ No newline at end of file
diff --git a/src/test/resources/testcases/test-99-output.txt b/src/test/resources/testcases/test-99-output.txt
index dbe14ee..bd7c5af 100644
--- a/src/test/resources/testcases/test-99-output.txt
+++ b/src/test/resources/testcases/test-99-output.txt
@@ -54,4 +54,10 @@ SetAclPrincipals for bob
 SetAclPaths on :home:alice#/sub/folder/of/their/homes 
   AclLine ALLOW {principals=[fred], privileges=[jcr:three]}
 AddGroupMembers user1 user2 in group grpA
-RemoveGroupMembers user3 user5 in group grpB
\ No newline at end of file
+RemoveGroupMembers user3 user5 in group grpB
+SetProperties on /pathA /path/B
+  PropertyLine sling:ResourceType{String}=[{String}/x/y/z]
+  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]
diff --git a/src/test/resources/testcases/test-99.txt b/src/test/resources/testcases/test-99.txt
index 594f454..69a483e 100644
--- a/src/test/resources/testcases/test-99.txt
+++ b/src/test/resources/testcases/test-99.txt
@@ -100,3 +100,15 @@ end
 # Add/remove principals to group, since V1.5.2
 add user1,user2 to group grpA
 remove user3,user5 from group grpB
+
+# Set properties, since V1.6.2
+# 'set' overwrites any existing value while
+# 'default' only sets the property if not set yet
+set properties on /pathA, /path/B
+  set sling:ResourceType{String} to /x/y/z
+  default someInteger{Long} to 42
+  set someFlag{Boolean} to true
+  default someDate{Date} to "2020-03-19T11:39:33.437+05:30"
+  set quotedMix to "quoted", non-quoted, "the last \" one"
+end
+