From d18adb9c2bd767f176be11fe33b201ece1e905a6 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Thu, 23 Mar 2006 08:09:51 +0000 Subject: [PATCH] Adjust char-set tests to match 8 bit representation --- scsh/test/pattern-matching-test.scm | 35 ++++++++++------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/scsh/test/pattern-matching-test.scm b/scsh/test/pattern-matching-test.scm index 2531b70..aa24eb0 100644 --- a/scsh/test/pattern-matching-test.scm +++ b/scsh/test/pattern-matching-test.scm @@ -1,13 +1,7 @@ ;;; Test for the function in section 6 of the scsh-manual "Pattern-matching strings with regular expressions" ;;; Author: Christoph Hetz -;; for testing: (certainly the path will be an other on other systems...) - -;; ,open define-record-types handle -;; ,config ,load C:/cygwin/home/mephisto/cvs-scsh/scsh/scsh/test/test-packages.scm -;; ,load C:/cygwin/home/mephisto/cvs-scsh/scsh/scsh/test/test-base.scm -;; load this file -;; (test-all) +;; for testing load this file and call (test-all) ;; *** basic help-functions *** @@ -556,28 +550,23 @@ (add-test! 'char-classes+algebra-test 'pattern-matching (lambda () - (and (matches-same-signs? (rx (| lower-case upper-case)) - (rx alphabetic)) - (matches-same-signs? (rx (- alphabetic lower-case)) - (rx upper-case)) - (matches-same-signs? (rx (- alphabetic upper-case)) - (rx lower-case)) - (matches-same-signs? (rx (& upper-case alphanumeric)) - (rx upper-case)) - (matches-same-signs? (rx (| upper-case lower-case numeric)) + (and (matches-same-signs? (rx (| alphabetic numeric)) (rx alphanumeric)) - (matches-same-signs? (rx (~ (& alphanumeric lower-case) + (matches-same-signs? (rx (- alphanumeric numeric)) + (rx alphabetic)) + (matches-same-signs? (rx (- alphanumeric alphabetic)) + (rx numeric)) + (matches-same-signs? (rx (& alphabetic alphanumeric)) + (rx alphabetic)) + (matches-same-signs? (rx (| alphabetic numeric numeric)) + (rx alphanumeric)) + (matches-same-signs? (rx (~ (& alphanumeric numeric) graphic (| upper-case numeric))) (rx (- any alphanumeric graphic))) - (matches-same-signs? (rx (/ "azAZ09")) - (rx alphanumeric)) - (matches-same-signs? (rx (~ (| (/ "az") (/ "AZ") (/ "09")))) - (rx (- any alphanumeric))) - (matches-same-signs? (rx (& (/ "az09") - (/ "AZ09"))) + (matches-same-signs? (rx (/ "09")) (rx numeric))))) (add-test! 'different-ways-test 'pattern-matching