diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-03-04 23:16:17 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-03-04 23:16:17 +0100 |
commit | ebb7cf9e21060105d9950dd5142c0eb918083666 (patch) | |
tree | 36c1607b80d92e27fb9d09029d1d3b57a1fd5065 /tests | |
parent | 0b870f7915f5da43758753fd088a22033936dc50 (diff) | |
parent | c2d7e800e6788277bc56f31d5836f9d507dc1506 (diff) | |
download | guix-ebb7cf9e21060105d9950dd5142c0eb918083666.tar.gz guix-ebb7cf9e21060105d9950dd5142c0eb918083666.zip |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r-- | tests/swh.scm | 10 | ||||
-rw-r--r-- | tests/ui.scm | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/swh.scm b/tests/swh.scm index e36c54e5fb..aef68acbe7 100644 --- a/tests/swh.scm +++ b/tests/swh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,8 +25,7 @@ ;; Test the JSON mapping machinery used in (guix swh). (define %origin - "{ \"id\": 42, - \"visits_url\": \"/visits/42\", + "{ \"visits_url\": \"/visits/42\", \"type\": \"git\", \"url\": \"http://example.org/guix.git\" }") @@ -48,11 +47,10 @@ (test-begin "swh") (test-equal "lookup-origin" - (list 42 "git" "http://example.org/guix.git") + (list "git" "http://example.org/guix.git") (with-json-result %origin (let ((origin (lookup-origin "http://example.org/guix.git"))) - (list (origin-id origin) - (origin-type origin) + (list (origin-type origin) (origin-url origin))))) (test-equal "lookup-origin, not found" diff --git a/tests/ui.scm b/tests/ui.scm index d8573e88d8..05eace6721 100644 --- a/tests/ui.scm +++ b/tests/ui.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -227,6 +227,10 @@ Second line" 24)) (expt 2 40) (size->number "1T")) +(test-equal "size->number, 1.M" + (expt 2 20) + (size->number "1.M")) + (test-assert "size->number, invalid unit" (catch 'quit (lambda () |