Test cases for `version-matches?'.
authorJulian Graham <julian.graham@aya.yale.edu>
Sun, 2 May 2010 18:58:15 +0000 (14:58 -0400)
committerJulian Graham <julian.graham@aya.yale.edu>
Sun, 2 May 2010 18:58:15 +0000 (14:58 -0400)
* test-suite/tests/modules.test ("module versions"): New tests for
  `version-matches?'.

test-suite/tests/modules.test

index ebcafe3..a6a955f 100644 (file)
               (current-module)))
        (lambda (key . args)
          #f))))
+
+\f
+;;;
+;;; R6RS compatibility
+;;;
+
+(with-test-prefix "module versions"
+
+  (pass-if "version-matches? for matching versions"
+    (version-matches? '(1 2 3) '(1 2 3)))
+
+  (pass-if "version-matches? for non-matching versions"
+    (not (version-matches? '(3 2 1) '(1 2 3))))
+
+  (pass-if "version-matches? against more specified version"
+    (version-matches? '(1 2) '(1 2 3)))
+
+  (pass-if "version-matches? against less specified version"
+    (not (version-matches? '(1 2 3) '(1 2)))))