diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-10-14 18:40:33 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-14 21:39:06 +0200 |
commit | 80a67734834a0981ca65cf1757a7d8408d02f1fd (patch) | |
tree | 4f622b3c5a725544736a75eaee52c6b4db6b29e0 /tests | |
parent | c5d735f798e0e58774b9ce0c6197695bc6f0daa9 (diff) |
services: Add 'dmd-service-back-edges'.
* gnu/services/dmd.scm (dmd-service-back-edges): New procedure.
* tests/services.scm ("dmd-service-back-edges"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/services.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/services.scm b/tests/services.scm index ae2d999fee..7d2e31b3a9 100644 --- a/tests/services.scm +++ b/tests/services.scm @@ -18,6 +18,7 @@ (define-module (test-services) #:use-module (gnu services) + #:use-module (gnu services dmd) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -104,6 +105,15 @@ (fold-services (list s) #:target-type t1) #f))) +(test-assert "dmd-service-back-edges" + (let* ((s1 (dmd-service (provision '(s1)) (start #f))) + (s2 (dmd-service (provision '(s2)) (requirement '(s1)) (start #f))) + (s3 (dmd-service (provision '(s3)) (requirement '(s1 s2)) (start #f))) + (e (dmd-service-back-edges (list s1 s2 s3)))) + (and (lset= eq? (e s1) (list s2 s3)) + (lset= eq? (e s2) (list s3)) + (null? (e s3))))) + (test-end) |