diff options
Diffstat (limited to 'formatst.scm')
| -rw-r--r-- | formatst.scm | 44 | 
1 files changed, 16 insertions, 28 deletions
| diff --git a/formatst.scm b/formatst.scm index 77a46c4..28d656a 100644 --- a/formatst.scm +++ b/formatst.scm @@ -19,7 +19,8 @@  ;   to string-downcase.  (require 'format) -(if (not (string=? format:version "3.0")) + +(if (not (string=? format:version "3.1"))      (begin        (display "You have format version ")        (display format:version) @@ -63,11 +64,10 @@  ; ensure format default configuration -(set! format:symbol-case-conv #f) -(set! format:iobj-case-conv #f) -(set! format:read-proof #f) -(set! format:iteration-bounded #t) -(set! format:max-iterations 100) +;;(set! format:symbol-case-conv #f) +;;(set! format:iobj-case-conv #f) +;;(set! format:iteration-bounded #t) +;;(set! format:max-iterations 100)  (format #t "~q") @@ -91,9 +91,9 @@  (test '("~a" (a (b c) d)) "(a (b c) d)")  (test '("~a" (a . b)) "(a . b)")  (test '("~a" (a (b c . d))) "(a (b . (c . d)))") ; this is ugly -(test `("~a" ,display) (format:iobj->str display)) -(test `("~a" ,(current-input-port)) (format:iobj->str (current-input-port))) -(test `("~a" ,(current-output-port)) (format:iobj->str (current-output-port))) +(test `("~a" ,display) (format:iobj->str display #f)) +(test `("~a" ,(current-input-port)) (format:iobj->str (current-input-port) #f)) +(test `("~a" ,(current-output-port)) (format:iobj->str (current-output-port) #f))  ; # argument test @@ -313,29 +313,19 @@ def")  ; read proof test -(test `("~:s" ,display) -      (begin -	(set! format:read-proof #t) -	(format:iobj->str display))) -(test `("~:a" ,display) -      (begin -	(set! format:read-proof #t) -	(format:iobj->str display))) -(test `("~:a" (1 2 ,display)) -      (begin -	(set! format:read-proof #t) -	(string-append "(1 2 " (format:iobj->str display) ")"))) +(test `("~:s" ,display) (format:iobj->str display #t)) +(test `("~:a" ,display) (format:iobj->str display #t)) +(test `("~:a" (1 2 ,display)) (string-append "(1 2 " (format:iobj->str display #t) ")"))  (test '("~:a" "abc") "abc") -(set! format:read-proof #f)  ; internal object case type force test  (set! format:iobj-case-conv string-upcase) -(test `("~a" ,display) (string-upcase (format:iobj->str display))) +(test `("~a" ,display) (string-upcase (format:iobj->str display #f)))  (set! format:iobj-case-conv string-downcase) -(test `("~s" ,display) (string-downcase (format:iobj->str display))) +(test `("~s" ,display) (string-downcase (format:iobj->str display #f)))  (set! format:iobj-case-conv string-capitalize) -(test `("~s" ,display) (string-capitalize (format:iobj->str display))) +(test `("~s" ,display) (string-capitalize (format:iobj->str display #f)))  (set! format:iobj-case-conv #f)  ; continuation line test @@ -366,7 +356,7 @@ def")  (test '("~:@(~a~)" (a b c)) "(A B C)")  (test '("~:@(~x~)" 255) "FF")  (test '("~:@(~p~)" 2) "S") -(test `("~:@(~a~)" ,display) (string-upcase (format:iobj->str display))) +(test `("~:@(~a~)" ,display) (string-upcase (format:iobj->str display #f)))  (test '("~:(~a ~a ~a~) ~a" "abc" "xyz" "123" "world") "Abc Xyz 123 world")  ; variable parameter @@ -662,5 +652,3 @@ def")  (if (not test-verbose) (display "done."))  (format #t "~%~a Test~:p completed. (~a failure~:p)~2%" total fails) - -; eof | 
