diff options
author | Gabriel Gonzalez <Gabriel439@gmail.com> | 2019-12-15 08:21:41 -0800 |
---|---|---|
committer | Gabriel Gonzalez <Gabriel439@gmail.com> | 2019-12-15 08:21:41 -0800 |
commit | 5edd4dd44c5f3de1886744aeac49bd396c24f966 (patch) | |
tree | 5811d2f007c2505ba34f4bbca81ca941183195dc /lib/tests/misc.nix | |
parent | 693096d283763ce71fcd2002d965c07546aaafda (diff) | |
download | nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar.gz nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar.bz2 nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar.lz nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar.xz nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.tar.zst nixpkgs-5edd4dd44c5f3de1886744aeac49bd396c24f966.zip |
Use a more realistic example that exercises all encodings
... as suggested by @roberth This also caught a bug in rendering lists, which this change also fixes
Diffstat (limited to 'lib/tests/misc.nix')
-rw-r--r-- | lib/tests/misc.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 021d0e88c91..29c5fad91f9 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -445,17 +445,21 @@ runTests { expr = encodeGNUCommandLine { } - { foo = "A"; + { data = builtins.toJSON { id = 0; }; - bar = 1; + X = "PUT"; - baz = null; + retry = 3; - qux = true; + retry-delay = null; - v = true; + url = [ "https://example.com/foo" "https://example.com/bar" ]; + + silent = false; + + verbose = true; }; - expected = " --bar '1' --foo 'A' --qux -v"; + expected = " -X 'PUT' --data '{\"id\":0}' --retry '3' --url 'https://example.com/foo' --url 'https://example.com/bar' --verbose"; }; } |