diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/profiles.scm | 17 | ||||
-rw-r--r-- | tests/ui.scm | 36 |
2 files changed, 35 insertions, 18 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 99f1fd2763..61c801c351 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -156,23 +156,6 @@ (equal? (list glibc) install) (equal? (list (cons guile-1.8.8 guile-2.0.9)) upgrade))))) -(test-assert "manifest-show-transaction" - (let* ((m (manifest (list guile-1.8.8))) - (t (manifest-transaction (install (list guile-2.0.9))))) - (let-values (((remove install upgrade) - (manifest-transaction-effects m t))) - (with-store store - (and (string-match "guile\t1.8.8 → 2.0.9" - (with-fluids ((%default-port-encoding "UTF-8")) - (with-error-to-string - (lambda () - (manifest-show-transaction store m t))))) - (string-match "guile\t1.8.8 -> 2.0.9" - (with-fluids ((%default-port-encoding "ISO-8859-1")) - (with-error-to-string - (lambda () - (manifest-show-transaction store m t)))))))))) - (test-assert "profile-derivation" (run-with-store %store (mlet* %store-monad diff --git a/tests/ui.scm b/tests/ui.scm index db90cdd479..236f541be2 100644 --- a/tests/ui.scm +++ b/tests/ui.scm @@ -19,11 +19,14 @@ (define-module (test-ui) #:use-module (guix ui) + #:use-module (guix profiles) #:use-module (guix store) #:use-module (guix derivations) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) #:use-module (srfi srfi-19) - #:use-module (srfi srfi-64)) + #:use-module (srfi srfi-64) + #:use-module (ice-9 regex)) ;; Test the (guix ui) module. @@ -35,6 +38,20 @@ R6RS, Guile includes a module system, full access to POSIX system calls, networking support, multiple threads, dynamic linking, a foreign function call interface, and powerful string processing.") +(define guile-1.8.8 + (manifest-entry + (name "guile") + (version "1.8.8") + (item "/gnu/store/...") + (output "out"))) + +(define guile-2.0.9 + (manifest-entry + (name "guile") + (version "2.0.9") + (item "/gnu/store/...") + (output "out"))) + (test-begin "ui") @@ -210,6 +227,23 @@ Second line" 24)) ;; This should print nothing. (show-what-to-build store (list drv))))))) +(test-assert "show-manifest-transaction" + (let* ((m (manifest (list guile-1.8.8))) + (t (manifest-transaction (install (list guile-2.0.9))))) + (let-values (((remove install upgrade) + (manifest-transaction-effects m t))) + (with-store store + (and (string-match "guile\t1.8.8 → 2.0.9" + (with-fluids ((%default-port-encoding "UTF-8")) + (with-error-to-string + (lambda () + (show-manifest-transaction store m t))))) + (string-match "guile\t1.8.8 -> 2.0.9" + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (with-error-to-string + (lambda () + (show-manifest-transaction store m t)))))))))) + (test-end "ui") |