(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 "- a
- b
- c
"
(enumerate '(a b c)))
(test "- a
- b
- c
"
(enumerate '(a b c) list-id: "test"))
;;; tabularize
(test ""
(tabularize '((1 2 3) (4 5 6))))
(test ""
(tabularize '((1 2 3) (4 5 6)) table-id: "test"))
(test ""
(tabularize '((1 2 3) (4 5 6)) table-id: "test" even-row-class: "yellow" odd-row-class: "blue"))
(test ""
(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: (