summaryrefslogtreecommitdiffstats
path: root/lib/tests
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-01-22 23:37:10 +0100
committerProfpatsch <mail@profpatsch.de>2020-01-23 14:47:38 +0100
commitb2654c226a83aa4cf5948f04ea6370796a2c7055 (patch)
treed4b6a29b2b78c624f9caf91fa37be5be6b318674 /lib/tests
parent6841f408cc7f42e3eaa59b06351008da2b1aa270 (diff)
lib/cli,lib/tests/misc: somewhat more standard formatting
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/misc.nix61
1 files changed, 26 insertions, 35 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix
index b320839b2ac7..59ed1e507e24 100644
--- a/lib/tests/misc.nix
+++ b/lib/tests/misc.nix
@@ -445,45 +445,36 @@ runTests {
# CLI
testToGNUCommandLine = {
- expr =
- cli.toGNUCommandLine
- { }
- { data = builtins.toJSON { id = 0; };
-
- X = "PUT";
-
- retry = 3;
-
- retry-delay = null;
-
- url = [ "https://example.com/foo" "https://example.com/bar" ];
-
- silent = false;
-
- verbose = true;
- };
+ expr = cli.toGNUCommandLine {} {
+ data = builtins.toJSON { id = 0; };
+ X = "PUT";
+ retry = 3;
+ retry-delay = null;
+ url = [ "https://example.com/foo" "https://example.com/bar" ];
+ silent = false;
+ verbose = true;
+ };
- expected = [ "-X" "PUT" "--data" "{\"id\":0}" "--retry" "3" "--url" "https://example.com/foo" "--url" "https://example.com/bar" "--verbose" ];
+ expected = [
+ "-X" "PUT"
+ "--data" "{\"id\":0}"
+ "--retry" "3"
+ "--url" "https://example.com/foo"
+ "--url" "https://example.com/bar"
+ "--verbose"
+ ];
};
testToGNUCommandLineShell = {
- expr =
- cli.toGNUCommandLineShell
- { }
- { data = builtins.toJSON { id = 0; };
-
- X = "PUT";
-
- retry = 3;
-
- retry-delay = null;
-
- url = [ "https://example.com/foo" "https://example.com/bar" ];
-
- silent = false;
-
- verbose = true;
- };
+ expr = cli.toGNUCommandLineShell {} {
+ data = builtins.toJSON { id = 0; };
+ X = "PUT";
+ retry = 3;
+ retry-delay = null;
+ url = [ "https://example.com/foo" "https://example.com/bar" ];
+ silent = false;
+ verbose = true;
+ };
expected = "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'";
};