aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-10-03 13:35:14 +0200
committerLudovic Courtès <ludo@gnu.org>2014-10-03 18:03:09 +0200
commit4a44d7bbc68ff3e363e6c166a588474cbd6c20f8 (patch)
tree05527f5ad13ba290127c5db1e516a3298b7dda1c /tests
parent882383a9aa5fbeef6f29d359a786a6db7c9e03db (diff)
downloadpatches-4a44d7bbc68ff3e363e6c166a588474cbd6c20f8.tar
patches-4a44d7bbc68ff3e363e6c166a588474cbd6c20f8.tar.gz
ui: Recognize the same size units as Coreutils.
* guix/ui.scm (size->number): Add a bunch of large units. Recognize one-letter unit names. Change "KB" to "kB". * tests/ui.scm ("size->number, 1T"): New test. * doc/guix.texi (Invoking guix gc): Add cross-reference to "Block size" in the Coreutils manual. (Invoking guix system): Likewise.
Diffstat (limited to 'tests')
-rw-r--r--tests/ui.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui.scm b/tests/ui.scm
index 7cc02649e1..db90cdd479 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -189,6 +189,10 @@ Second line" 24))
(inexact->exact (round (* 1.2 (expt 2 30))))
(size->number "1.2GiB"))
+(test-equal "size->number, 1T"
+ (expt 2 40)
+ (size->number "1T"))
+
(test-assert "size->number, invalid unit"
(catch 'quit
(lambda ()