diff options
author | Leo Famulari <leo@famulari.name> | 2017-04-22 18:27:12 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-04-22 18:27:12 -0400 |
commit | 1524851f58d8d69f6c6e1c6406cf174083bbe82d (patch) | |
tree | d7c63b716501e4423e9f7173790a8cc4c3962935 /tests/derivations.scm | |
parent | 0802f3a034815576bf0e28c59c968400566b418b (diff) | |
parent | ed9fb46b16cf7632e6df15c52c7183807fe5d1f9 (diff) | |
download | guix-1524851f58d8d69f6c6e1c6406cf174083bbe82d.tar guix-1524851f58d8d69f6c6e1c6406cf174083bbe82d.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 75c8d1dfb1..cabbf7b951 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -701,6 +701,20 @@ #:modules '((guix module that does not exist))))) +(test-equal "build-expression->derivation and builder encoding" + '("UTF-8" #t) + (let* ((exp '(λ (α) (+ α 1))) + (drv (build-expression->derivation %store "foo" exp))) + (match (derivation-builder-arguments drv) + ((... builder) + (with-fluids ((%default-port-encoding "UTF-8")) + (call-with-input-file builder + (lambda (port) + (list (port-encoding port) + (->bool + (string-contains (get-string-all port) + "(λ (α) (+ α 1))")))))))))) + (test-assert "build-expression->derivation and derivation-prerequisites" (let ((drv (build-expression->derivation %store "fail" #f))) (any (match-lambda |