(import scheme (chicken base) (chicken port) svnwiki-sxml test) (define (->sxml text) (call-with-input-string text svnwiki->sxml)) (test-begin "Font styles") (test '((p (b "don't"))) (->sxml "'''don't'''")) (test '((p (i "don't"))) (->sxml "''don't''")) (test-end "Font styles") (test-begin "Links") (test '((p "[[]]")) (->sxml "[[]]")) (test '((p (int-link "foo"))) (->sxml "[[foo]]")) (test '((p (int-link "foo"))) (->sxml "[[foo|]]")) (test '((p (int-link "#foo" "foo"))) (->sxml "[[#foo]]")) (test '((p (int-link "#foo" "foo"))) (->sxml "[[#foo|]]")) (test '((p (int-link "/foo"))) (->sxml "[[/foo]]")) (test '((p (link "http://foo"))) (->sxml "[[http://foo]]")) (test '((p (link "http://foo"))) (->sxml "[[http://foo|]]")) (test '((p (link "https://foo"))) (->sxml "[[https://foo]]")) (test '((p (link "ftp://foo"))) (->sxml "[[ftp://foo]]")) (test-end "Links") (test-exit)