aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-04-20 21:59:03 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-04-20 21:59:03 +0200
commitfb77fc13d86c620326eb1e8c15162182e9b7d105 (patch)
tree82932f4f136e0eb8768f71687f37610aa6f77ead
parentRemove remaining export's. (diff)
downloadcalp-fb77fc13d86c620326eb1e8c15162182e9b7d105.tar.gz
calp-fb77fc13d86c620326eb1e8c15162182e9b7d105.tar.xz
Fix up tests.
-rw-r--r--tests/let.scm4
-rw-r--r--tests/prop.scm12
-rw-r--r--tests/recurring.scm3
-rw-r--r--tests/rrule-parse.scm4
-rwxr-xr-xtests/run-tests.scm10
-rwxr-xr-xtests/termios.scm4
6 files changed, 7 insertions, 30 deletions
diff --git a/tests/let.scm b/tests/let.scm
index 53f39e4c..02e38a42 100644
--- a/tests/let.scm
+++ b/tests/let.scm
@@ -1,7 +1,5 @@
(use-modules (util))
-(test-begin "let")
-
(test-assert (let* ((a #t)) a))
(test-assert (let* (((a . b) '(#t . #f))) a))
(test-assert (let* (((a . b) (cons* #f #t))) b))
@@ -14,5 +12,3 @@
(test-equal 30 (let* (x y) (set! x 10) (set! y 20) (+ x y)))
(test-assert (let* (x) (not x)))
(test-equal 6 (let* ((x 1) y z) (set! y 2) (set! z 3) (+ x y z)))
-
-(test-end "let")
diff --git a/tests/prop.scm b/tests/prop.scm
index d63703cd..249dd21b 100644
--- a/tests/prop.scm
+++ b/tests/prop.scm
@@ -4,12 +4,8 @@
(string-append (getenv "TESTPATH")
"/prop.ics")))
-(test-begin "Proporty test")
-(test-equal (prop v 'KEY 'A) '(("1")))
-(test-equal (prop v 'KEY 'B) '(("2")))
-(test-equal (prop v 'KEY 'C) '())
+(test-equal '("1") (prop (attr* v 'KEY) 'A))
+(test-equal '("2") (prop (attr* v 'KEY) 'B))
+(test-equal #f (prop (attr* v 'KEY) 'C))
-(test-equal (properties v 'KEY) '(A B))
-(test-equal (properties v "KEY") '(A B))
-
-(test-end "Proporty test")
+(test-equal '(A B) (map car (properties (attr* v 'KEY))))
diff --git a/tests/recurring.scm b/tests/recurring.scm
index ebf40cb1..7e4f60ba 100644
--- a/tests/recurring.scm
+++ b/tests/recurring.scm
@@ -18,8 +18,6 @@
(getenv "TESTPATH")
str))
-(test-begin "recurrence test")
-
(define cal-1 (make-vcomponent (tcal "simple-daily.ics")))
(let ((ev (car (children cal-1 'VEVENT))))
@@ -47,4 +45,3 @@
(s4 (add-day s3)))
(list s0 s1 s2 s3 s4))) )
-(test-end "recurrence test")
diff --git a/tests/rrule-parse.scm b/tests/rrule-parse.scm
index b3bbe770..f620e882 100644
--- a/tests/rrule-parse.scm
+++ b/tests/rrule-parse.scm
@@ -1,5 +1,3 @@
-(test-begin "RRULE parse")
-
(use-modules (vcalendar recurrence parse))
(define-syntax mkrule
@@ -31,5 +29,3 @@
(parse-recurrence-rule "FREQ=HOURLY;COUNT=-1") ; TODO this error seems to have an error
;; => #<<recur-rule> freq: HOURLY until: #f count: #<<recur-rule> freq: HOURLY until: #f count: #f interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO> interval: 1 bysecond: #f byminute: #f byhour: #f byday: #f bymonthday: #f byyearday: #f byweekno: #f bymonth: #f bysetpos: #f wkst: MO>
;; ERR unfulfilled-constraint [-1] doesn't fulfill constraint of type [COUNT], ignoring
-
-(test-end "RRULE parse")
diff --git a/tests/run-tests.scm b/tests/run-tests.scm
index e68f058b..529878c7 100755
--- a/tests/run-tests.scm
+++ b/tests/run-tests.scm
@@ -27,11 +27,7 @@
;; Load tests
(add-to-load-path here)
-(for-each load-from-path files)
-;; Final test, triggers output
-(test-begin "metatest")
-(test-assert #t)
-(test-expect-fail 1)
-(test-assert #f)
-(test-end "metatest")
+(test-begin "tests")
+(for-each load-from-path files)
+(test-end "tests")
diff --git a/tests/termios.scm b/tests/termios.scm
index 707648d4..3d5ef9d1 100755
--- a/tests/termios.scm
+++ b/tests/termios.scm
@@ -20,8 +20,6 @@
(define-syntax-rule (&= lvalue val)
(mod! lvalue (lambda (v) (& v val))))
-(test-begin "termios")
-
(define t (make-termios))
(test-equal 0 (tcgetattr! t))
@@ -35,5 +33,3 @@
(test-equal (& ifl (~ (|| ECHO ICANON)))
(lflag t))
(test-equal 0 (tcsetattr! copy))
-
-(test-end "termios")