aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/config.testscript48
1 files changed, 47 insertions, 1 deletions
diff --git a/tests/config.testscript b/tests/config.testscript
index f4ce520..c08c3bf 100644
--- a/tests/config.testscript
+++ b/tests/config.testscript
@@ -39,6 +39,27 @@ deinit += -d prj
@cfg $~/cfg-dir/ 1 target default,forwarded,auto-synchronized
EOO
+ # While at it, test printing the configurations list in the JSON format.
+ #
+ $* list @cfg --stdout-format 'json' >>/~"%EOO%";
+ [
+ {
+ "id": 1,
+ "path": "$~/cfg-dir",
+ "name": "cfg",
+ "type": "target",
+ "default": true,
+ "forward": true,
+ "auto-sync": true,
+ "packages": [
+ {
+ "name": "prj"
+ }
+ ]
+ }
+ ]
+ EOO
+
$update @cfg 2>>~%EOE%;
%(mkdir|c\+\+|ld) .+%{3}
EOE
@@ -254,9 +275,34 @@ deinit += -d prj
$* add @host-cfg 2>!;
- $* add @cfg 2>>/"EOE"
+ $* add @cfg 2>>/"EOE";
added configuration @cfg $~/prj-cfg/ 5 target default,forwarded,auto-synchronized
EOE
+
+ # While at it, test printing the configurations list in the JSON format.
+ #
+ $* list --stdout-format 'json' >>/~"%EOO%"
+ [
+ {
+ "id": 5,
+ "path": "$~/prj-cfg",
+ "name": "cfg",
+ "type": "target",
+ "default": true,
+ "forward": true,
+ "auto-sync": true
+ },
+ {
+ "id": 4,
+ "path": "$~/prj-host-cfg",
+ "name": "host-cfg",
+ "type": "host",
+ "default": true,
+ "forward": true,
+ "auto-sync": true
+ }
+ ]
+ EOO
}
: move