diff --git a/collects/meta/props b/collects/meta/props index c45f008b13..7df417cc59 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1900,6 +1900,7 @@ path/s is either such a string or a list of them. "collects/tests/xml" responsible (jay) "collects/tests/xml/test-clark.rkt" drdr:command-line #f drdr:timeout 300 "collects/tests/xml/xml-snip-bug.rkt" drdr:command-line (gracket "-t" *) +"collects/tests/zo-size.rkt" responsible (jay) "collects/tex2page" responsible (jay) "collects/texpict" responsible (mflatt robby) "collects/texpict/balloon.rkt" drdr:command-line (gracket-text "-t" *) diff --git a/collects/tests/zo-size.rkt b/collects/tests/zo-size.rkt new file mode 100644 index 0000000000..953d62d2b8 --- /dev/null +++ b/collects/tests/zo-size.rkt @@ -0,0 +1,29 @@ +#lang racket/base +(require racket/path + racket/match) + +(define (indent i) + (for ([t (in-range i)]) + (printf "|"))) + +(define (dir-zo-size i p) + (parameterize ([current-directory p]) + (define subdir? #f) + (define (has-sub-dir!) + (unless subdir? + (indent i) (printf "~a:\n" p) + (set! subdir? #t))) + (define tot + (for/fold ([size 0]) + ([p (in-list (directory-list))]) + (+ + (match p + [(? directory-exists?) (has-sub-dir!) (dir-zo-size (add1 i) p)] + [(app filename-extension #"zo") (file-size p)] + [else 0]) + size))) + (unless (zero? tot) + (indent i) (printf "~a: ~a\n" p tot)) + tot)) + +(void (dir-zo-size 0 (simplify-path (build-path (collection-path "racket") 'up)))) \ No newline at end of file