
* Move sha1 test to the same place, to be run like the others. * Unify tests for untar and unzip. * Also improve them: test results instead of failing with errors. Also, generate random text to archive, and use 0 for group+other permission bits (to avoid world writable results on an error).
13 lines
347 B
Racket
13 lines
347 B
Racket
#lang racket/base
|
|
(require file/sha1 tests/eli-tester)
|
|
|
|
(provide tests)
|
|
|
|
(module+ main (tests))
|
|
(define (tests)
|
|
(test
|
|
;; The docs say that sha1 must return a 40-character string,
|
|
;; and should include leading zeros.
|
|
(string-length (sha1 (open-input-string ""))) => 40
|
|
(string-length (sha1 (open-input-string " r a c k et"))) => 40))
|