diff options
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 () |