~evhan/topham unlisted

46f8adc13ecff0ebdf74264cf7647c977efefbbc — Evan Hanson 6 months ago 907e481
Add test for CLI program
1 files changed, 9 insertions(+), 1 deletions(-)

M tests/run.scm
M tests/run.scm => tests/run.scm +9 -1
@@ 11,8 11,16 @@
        (test)
        (topham))

(let ((topham "topham --help >/dev/null")
      (topham-usage "Usage: topham [options ...] command ..."))
  (import (chicken io)
          (chicken process))
  (test 0 (system topham))
  (let ((output (call-with-input-pipe "topham --help" read-lines)))
    (test-assert (member topham-usage output))))

(unless (get-environment-variable "SRHT_ACCESS_TOKEN")
  (print "skipping tests (no access token)")
  (print "skipping remaining tests (no access token)")
  (exit))

(let ()