# Test script for Tkhtml
proc sourcefile {file} {
  set fname [file join [file dirname [info script]] $file] 
  uplevel #0 [list source $fname]
}
sourcefile common.tcl

html .h

#--------------------------------------------------------------------------
# Test cases option-1.* test the parsing of the '-fonttable' option.
#
tcltest::test option-1.0 {} -body {
  .h cget -fonttable
} -result {8 9 10 11 13 15 17}
tcltest::test option-1.1 {} -body {
  set rc [catch {
    .h configure -fonttable hello
  } msg]
  list $rc $msg
} -result {1 {expected list of 7 integers but got "hello"}}
tcltest::test option-1.2 {} -body {
  .h cget -fonttable
} -result {8 9 10 11 13 15 17}
tcltest::test option-1.3 {} -body {
  .h configure -fonttable {1 2 3 4 5 6 7}
  .h cget -fonttable
} -result {1 2 3 4 5 6 7}


finish_test


