[uim-commit] r184 - in trunk: scm test

yamaken@freedesktop.org yamaken@freedesktop.org
Sun Jan 9 00:50:31 PST 2005


Author: yamaken
Date: 2005-01-09 00:50:28 -0800 (Sun, 09 Jan 2005)
New Revision: 184

Modified:
   trunk/scm/custom.scm
   trunk/test/test-custom.scm
Log:
* scm/custom.scm
  - All changes are validated by test-custom.scm
  - (custom-validator-alist):
    * Replace pathname? with custom-pathname?
    * Replace key-definition? with custom-key?
  - (pathname?): Rename to custom-pathname?
  - (custom-pathname?): Renamed from pathname?
  - (key-definition?): Rename to custom-key?
  - (custom-key?):
    * Renamed from key-definition?
    * Remove a comment
    * Remove the temporary implementation
* test/test-custom.scm
  - (test pathname?): Rename to custom-pathname?
  - (test custom-pathname?):
    * Renamed from pathname?
    * Follow the renaming


Modified: trunk/scm/custom.scm
===================================================================
--- trunk/scm/custom.scm	2005-01-09 08:38:51 UTC (rev 183)
+++ trunk/scm/custom.scm	2005-01-09 08:50:28 UTC (rev 184)
@@ -51,9 +51,9 @@
   '((boolean   . custom-boolean?)
     (integer   . custom-integer?)
     (string    . custom-string?)
-    (pathname  . pathname?)
+    (pathname  . custom-pathname?)
     (choice    . custom-valid-choice?)
-    (key       . key-definition?)))
+    (key       . custom-key?)))
 
 (define anything?
   (lambda (x)
@@ -73,7 +73,7 @@
   (lambda (x regex)
     (string? x)))
 
-(define pathname?
+(define custom-pathname?
   (lambda (str)
     (string? str)))
 
@@ -104,10 +104,9 @@
 	   (desc (custom-choice-rec-desc srec)))
       desc)))
 
-;; only accepts single strict-key-str (not or'ed, not a variable reference)
-(define key-definition?
+(define custom-key?
   (lambda (def)
-    (valid-strict-key-str? def)))
+    ))
 
 (define-record 'custom-group-rec
   '((sym   #f)

Modified: trunk/test/test-custom.scm
===================================================================
--- trunk/test/test-custom.scm	2005-01-09 08:38:51 UTC (rev 183)
+++ trunk/test/test-custom.scm	2005-01-09 08:50:28 UTC (rev 184)
@@ -97,19 +97,19 @@
    (assert-false (uim-bool '(custom-string? 10 ".*")))
    (assert-false (uim-bool '(custom-string? () ".*")))
    (assert-false (uim-bool '(custom-string? '(1 "2" 'three) ".*"))))
-  ("test pathname?"
-   (assert-false (uim-bool '(pathname? #f)))
-   (assert-false (uim-bool '(pathname? 'foo)))
-   (assert-false (uim-bool '(pathname? -1)))
-   (assert-false (uim-bool '(pathname? 0)))
-   (assert-false (uim-bool '(pathname? 1)))
-   (assert-false (uim-bool '(pathname? 10)))
-   (assert-false (uim-bool '(pathname? ())))
-   (assert-false (uim-bool '(pathname? '(1 "2" 'three))))
-   (assert-true  (uim-bool '(pathname? "/usr/share/uim/foo.scm")))
-   (assert-true  (uim-bool '(pathname? "~/.uim")))
-   (assert-true  (uim-bool '(pathname? "share/uim/bar.scm")))
-   (assert-true  (uim-bool '(pathname? "baz.scm"))))
+  ("test custom-pathname?"
+   (assert-false (uim-bool '(custom-pathname? #f)))
+   (assert-false (uim-bool '(custom-pathname? 'foo)))
+   (assert-false (uim-bool '(custom-pathname? -1)))
+   (assert-false (uim-bool '(custom-pathname? 0)))
+   (assert-false (uim-bool '(custom-pathname? 1)))
+   (assert-false (uim-bool '(custom-pathname? 10)))
+   (assert-false (uim-bool '(custom-pathname? ())))
+   (assert-false (uim-bool '(custom-pathname? '(1 "2" 'three))))
+   (assert-true  (uim-bool '(custom-pathname? "/usr/share/uim/foo.scm")))
+   (assert-true  (uim-bool '(custom-pathname? "~/.uim")))
+   (assert-true  (uim-bool '(custom-pathname? "share/uim/bar.scm")))
+   (assert-true  (uim-bool '(custom-pathname? "baz.scm"))))
   ("test custom-valid-choice?"
    (assert-false (uim-bool '(custom-valid-choice?
 			     #f



More information about the Uim-commit mailing list