aboutsummaryrefslogtreecommitdiff
path: root/test/runner.scm
blob: 45f2b0c559f9d94f5999eafac9b7e86f831cfa3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;; Run with
;;
;;   guile -L  . --debug test/runner.scm

(define-module (test-runner)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-64)
  #:use-module (gn data species)
  )

(test-begin "runner")

(test-assert "species-meta is expected contain a link to tomato"
  (assoc "tomato" (cdr (assoc "links" (get-species-meta)))))

(test-assert "tomato-meta should have a document link"
   (assoc "doc" (get-expanded-taxon-meta "tomato")))

(test-equal "tomato-data should have a description"
  (assoc-ref (get-expanded-taxon-data "tomato") "description") "type of plant species with edible, often red, berry fruit")

(test-end "runner")