home: hub: zuo

ref: 45c44551552c6628a537c015c94812012ba6875d
dir: /tests/build.zuo/

View raw version
#lang zuo

(require "harness.zuo")

(alert "build")

(let ()
  (define p (process (hash-ref (runtime-env) 'exe #f)
                     (at-source "build-cycle.zuo")
                     (hash 'stdin 'pipe 'stdout 'pipe 'stderr 'pipe)))
  (fd-close (hash-ref p 'stdin))
  (define out (fd-read (hash-ref p 'stdout) eof))
  (define err (fd-read (hash-ref p 'stderr) eof))
  (fd-close (hash-ref p 'stdout))
  (fd-close (hash-ref p 'stderr))
  (process-wait (hash-ref p 'process))

  (check (glob-match? "*dependency cycle*" err) #t)
  (check "" out))