fix contract

original commit: fba1777b8ad6d84200e17c85896f9f6d210b0d1d
This commit is contained in:
Matthew Flatt 2011-08-02 06:39:47 -06:00
parent 9e9a62ff99
commit 76e087da84
2 changed files with 38 additions and 15 deletions

View File

@ -9,9 +9,10 @@
(prefix-in html: "html-render.rkt")) (prefix-in html: "html-render.rkt"))
(provide/contract (provide/contract
[render ((listof part?) [render (((listof part?)
(listof path-string?) (listof path-string?))
#:render-mixin (class? . -> . class?) (#:render-mixin
(class? . -> . class?)
#:dest-dir (or/c #f path-string?) #:dest-dir (or/c #f path-string?)
#:prefix-file (or/c #f path-string?) #:prefix-file (or/c #f path-string?)
#:style-file (or/c #f path-string?) #:style-file (or/c #f path-string?)
@ -22,8 +23,8 @@
#:xrefs (listof xref?) #:xrefs (listof xref?)
#:info-in-files (listof path?) #:info-in-files (listof path?)
#:info-out-file (or/c #f path-string?) #:info-out-file (or/c #f path-string?)
#:quiet? any/c #:quiet? any/c)
. -> . void?)]) . ->* . void?)])
(define (render docs (define (render docs
names names

View File

@ -0,0 +1,22 @@
#lang racket/base
(require scribble/render
scribble/text-render
scribble/core
racket/file)
(render (list (part #f
null
(list "Render")
(style #f null)
null
(list (paragraph (style #f null) "The content."))
null))
(list "example")
#:render-mixin render-mixin)
(unless (string=? "Render\n\nThe content.\n"
(file->string "example.txt"))
(error "render test failed"))
(delete-file "example.txt")