diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-07-19 17:08:53 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-07-19 17:08:53 +0200 |
commit | c71cd4a61fc8085ccb17169aad826d6f9ee1718b (patch) | |
tree | f269f2a7772da03d0698c45131d4ca5b0aab19b1 /tests/hash.scm | |
parent | f5db54eaa51f4fdd9cec14254e413e17bfca4cca (diff) | |
download | guix-c71cd4a61fc8085ccb17169aad826d6f9ee1718b.tar guix-c71cd4a61fc8085ccb17169aad826d6f9ee1718b.tar.gz |
hash: sha256 port now implements 'port-position'.
* guix/hash.scm (open-sha256-port)[position]: New variable.
[get-position]: New procedure.
Pass it to 'make-custom-binary-output-port'.
* tests/hash.scm ("open-sha256-port, hello"): Test 'port-position'.
Diffstat (limited to 'tests/hash.scm')
-rw-r--r-- | tests/hash.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/hash.scm b/tests/hash.scm index da87616eec..47dff3915b 100644 --- a/tests/hash.scm +++ b/tests/hash.scm @@ -64,12 +64,12 @@ (get))) (test-equal "open-sha256-port, hello" - %hello-sha256 + (list %hello-sha256 (string-length "hello world")) (let-values (((port get) (open-sha256-port))) (put-bytevector port (string->utf8 "hello world")) (force-output port) - (get))) + (list (get) (port-position port)))) (test-assert "port-sha256" (let* ((file (search-path %load-path "ice-9/psyntax.scm")) |