From e96bac4523d22715bd665f40c585046bebfd6c24 Mon Sep 17 00:00:00 2001 From: Julian Graham Date: Sun, 2 May 2010 14:58:15 -0400 Subject: [PATCH] Test cases for `version-matches?'. * test-suite/tests/modules.test ("module versions"): New tests for `version-matches?'. --- test-suite/tests/modules.test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test-suite/tests/modules.test b/test-suite/tests/modules.test index ebcafe3a0..a6a955f3c 100644 --- a/test-suite/tests/modules.test +++ b/test-suite/tests/modules.test @@ -330,3 +330,22 @@ (current-module))) (lambda (key . args) #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)))))