.
original commit: 13e7d0e72325c6baf53af7a38c65dd39104bea9c
This commit is contained in:
parent
868d42f2a8
commit
c922f1be91
|
@ -40,9 +40,9 @@
|
||||||
(let ([with-censor (load-relative "censor.ss")])
|
(let ([with-censor (load-relative "censor.ss")])
|
||||||
(with-censor
|
(with-censor
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; Test all chars up to 300
|
;; Test all ASCII chars
|
||||||
(let ([p (let loop ([n 0])
|
(let ([p (let loop ([n 0])
|
||||||
(if (= n 300)
|
(if (= n 128)
|
||||||
null
|
null
|
||||||
(let ([s (string (char-downcase (integer->char n)))])
|
(let ([s (string (char-downcase (integer->char n)))])
|
||||||
(cons (cons (string->symbol s) s)
|
(cons (cons (string->symbol s) s)
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
(if (= (string-length str) 1)
|
(if (= (string-length str) 1)
|
||||||
(string-append "0" str)
|
(string-append "0" str)
|
||||||
str))))
|
str))))
|
||||||
(for (code 0 256)
|
(for (code 0 127)
|
||||||
(if (or (= code 45) (= code 33) (= code 95)
|
(if (or (= code 45) (= code 33) (= code 95)
|
||||||
(= code 46) (= code 126) (= code 42)
|
(= code 46) (= code 126) (= code 42)
|
||||||
(= code 39) (= code 40) (= code 41)
|
(= code 39) (= code 40) (= code 41)
|
||||||
|
@ -323,12 +323,15 @@
|
||||||
(open-input-bytes tricky-string)
|
(open-input-bytes tricky-string)
|
||||||
line-rx max-w))
|
line-rx max-w))
|
||||||
tricky-strings)
|
tricky-strings)
|
||||||
(let ([dir (collection-path "tests" "mzscheme")])
|
(parameterize ([current-pseudo-random-generator (make-pseudo-random-generator)])
|
||||||
(for-each (lambda (p)
|
(random-seed 17)
|
||||||
(when (regexp-match #rx"[.]ss$" (path->string p))
|
(let ([dir (collection-path "tests" "mzscheme")])
|
||||||
(unless (equal? (path->string p) "flat.ss")
|
(for-each (lambda (p)
|
||||||
(check-same-file encode decode (build-path dir p) line-rx max-w))))
|
(when (regexp-match #rx"[.]ss$" (path->string p))
|
||||||
(directory-list dir))))
|
(unless (or (positive? (random 10)) ; check random 1/10 of files
|
||||||
|
(equal? (path->string p) "flat.ss"))
|
||||||
|
(check-same-file encode decode (build-path dir p) line-rx max-w))))
|
||||||
|
(directory-list dir)))))
|
||||||
|
|
||||||
(check-same-all (lambda (i o) (qp-encode-stream i o))
|
(check-same-all (lambda (i o) (qp-encode-stream i o))
|
||||||
qp-decode-stream
|
qp-decode-stream
|
||||||
|
|
Loading…
Reference in New Issue
Block a user