derivations: Adjust builder encoding test.

This is a followup to 9231ef12f2.

* tests/derivations.scm ("build-expression->derivation and builder
encoding"): Set '%default-port-encoding' to "UTF-8".
This commit is contained in:
Ludovic Courtès 2017-04-22 14:05:38 +02:00
parent 611924eb87
commit 8a8e2d2ed5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 7 additions and 6 deletions

View File

@ -707,12 +707,13 @@
(drv (build-expression->derivation %store "foo" exp)))
(match (derivation-builder-arguments drv)
((... builder)
(call-with-input-file builder
(lambda (port)
(list (port-encoding port)
(->bool
(string-contains (get-string-all port)
"(λ (α) (+ α 1))")))))))))
(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)))