aboutsummaryrefslogtreecommitdiffstats
path: root/utils.scm
blob: a1317175723c8144742d39b244baaf9de0225e80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(module utils (inline-tests)
  (import scheme
          (chicken base)
          (chicken process-context))

  (define-syntax inline-tests
    (syntax-rules ()
      ((_ expr ...)
       (let* ((v (get-environment-variable "INLINE_TESTS"))
              (should-run-inline-tests? (and (string? v)
                                             (string=? v "1"))))
         (if should-run-inline-tests?
             (begin expr ...)))))))