correct some tests

master
Matthew Butterick 7 years ago
parent c1e382cffc
commit 1bd40b5e45

@ -142,19 +142,19 @@ will be combined into a single submodule.
(module+ test
(check-txexprs-equal? ◊xref{target}
`(a ((class "xref") (href "target.html") ,no-hyphens-attr) "target"))
(check-txexprs-equal? ◊xref["url"]{target}
`(a ((class "xref") (href "url") ,no-hyphens-attr) "target"))
(check-exn exn:fail:contract:arity? (λ _ (xref "url" "target" "spurious-third-argument"))))
(check-txexprs-equal? ◊xref{word space}
`(a ((class "xref") (href "word-spaces.html") ,no-hyphens-attr) "word space"))
(check-txexprs-equal? ◊xref["word-spaces.html"]{target}
`(a ((class "xref") (href "word-spaces.html") ,no-hyphens-attr) "target"))
(check-exn exn:fail:contract:arity? (λ _ (xref "word-spaces.html" "target" "spurious-third-argument"))))
(module+ test
(check-equal? (target->url "foo?") "foo.html")
(check-equal? (target->url "FOO") "foo.html")
(check-equal? (target->url "foé") "foe.html")
(check-equal? (target->url "word space") "word-spaces.html")
(check-equal? (target->url "WORD SPACE") "word-spaces.html")
(check-equal? (target->url "word spacé") "word-spaces.html")
(check-equal? (target->url "Foreword Lengthy Title") "foreword.html")
(check-equal? (target->url "Table of Contents and Other Nonsense") "toc.html")
(check-equal? (target->url "Nonbreaking Space and Spaces") "nonbreaking-space-and-spaces.html"))
(check-equal? (target->url "Word Spaces") "word-spaces.html"))
(module+ test

@ -562,7 +562,7 @@ Well, almost. One wrinkle that arises is connecting singular and plural versions
[afn (in-list actual-filenames)]
#:when (equal? tfn afn))
tfn)
(error (format "no URL found for ~a" target))))]
(error (format "no URL found for ~v" target))))]
@defproc[