From b2654c226a83aa4cf5948f04ea6370796a2c7055 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 22 Jan 2020 23:37:10 +0100 Subject: lib/cli,lib/tests/misc: somewhat more standard formatting --- lib/tests/misc.nix | 61 +++++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) (limited to 'lib/tests') 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'"; }; -- cgit v1.2.3