(use html-utils) (use posix test html-tags) (test-begin "html-utils") (test-begin "html-utils strings") ;;; combo-box (test "" (combo-box "test" '(1 2 3))) (test "" (combo-box "test" '((1 1) (2 2) (3 3)))) (test "" (combo-box "test" '((1 . 1) (2 . 2) (3 . 3)))) (test "" (combo-box "test" '(#(1 1) #(2 2) #(3 3)))) (test "" (combo-box "test" '(#(1 1) #(2 2) #(3 3)) default: 1)) (test "" (combo-box "test" '(#(1 1) #(2 2) #(3 3)) first-empty: #t)) (test "" (combo-box "test" '(#(1 1) #(2 2) #(3 3)) first-empty: #t default: 2)) (test "" (combo-box "test" '(#(1 1) #(2 2) #(3 3)) first-empty: #t default: "")) ;;; hidden-input (test "" (hidden-input "test")) (test "" (hidden-input "test" 0)) (test "" (hidden-input '((test . 0) (test2 . 1)))) ;;; itemize (test "" (itemize '(a b c))) (test "" (itemize '(a b c) list-id: "test")) ;;; enumerate (test "
  1. a
  2. b
  3. c
" (enumerate '(a b c))) (test "
  1. a
  2. b
  3. c
" (enumerate '(a b c) list-id: "test")) ;;; tabularize (test "
123
456
" (tabularize '((1 2 3) (4 5 6)))) (test "
123
456
" (tabularize '((1 2 3) (4 5 6)) table-id: "test")) (test "
123
456
" (tabularize '((1 2 3) (4 5 6)) table-id: "test" even-row-class: "yellow" odd-row-class: "blue")) (test "
abc
123
456
" (tabularize '((1 2 3) (4 5 6)) header: '(a b c))) ;;; html-page (test "" (html-page "")) (test "" (html-page "" doctype: "")) (test "title" (html-page "" title: "title")) (test "title" (html-page "" title: "title" charset: "UTF-8")) (test "title" (html-page "" title: "title" headers: (" (html-page "" title: "title" headers: (" (html-page "" title: "title" headers: (" (html-page "" title: "title" headers: (" (let ((page #f)) (with-output-to-file "style2.css" (cut print "body { font-size: 10pt; }")) (set! page (html-page "" title: "title" headers: (