Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.189 -r1.190 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 14 Feb 2011 11:13:13 -0000 1.189 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 14 Feb 2011 11:22:40 -0000 1.190 @@ -2881,71 +2881,6 @@ "" return $result } - - ########################################################### - # - # a few test cases - # - ########################################################### - - proc ? {cmd expected {msg ""}} { - ::xo::Timestamp t1 - set r [uplevel $cmd] - if {$msg eq ""} {set msg $cmd} - if {$r ne $expected} { - regsub -all \# $r "" r - append ::_ "Error: $msg returned \n'$r' ne \n'$expected'\n" - } else { - append ::_ "$msg - passed ([t1 diff] ms)\n" - } - } - # - proc test_form_fields {} { - set ::_ "" - set o [Object new -destroy_on_cleanup] - # mixin methods for create_raw_form_field - $o mixin ::xowiki::Page - - set f0 [$o create_raw_form_field -name test \ - -slot ::xowiki::Page::slot::name] - ? {$f0 asWidgetSpec} \ - {text {label #xowiki.Page-name#} {html {size 80 }} {help_text {Shortname to identify an entry within a folder, typically lowercase characters}}} \ - "name with help_text" - - set f0 [$o create_raw_form_field -name test \ - -slot ::xowiki::Page::slot::name -spec inform] - ? {$f0 asWidgetSpec} \ - {text(inform) {label #xowiki.Page-name#} {help_text {Shortname to identify an entry within a folder, typically lowercase characters}}} \ - "name with help_text + inform" - - set f0 [$o create_raw_form_field -name test \ - -slot ::xowiki::Page::slot::name -spec optional] - ? {$f0 asWidgetSpec} \ - {text,optional {label #xowiki.Page-name#} {html {size 80 }} {help_text {Shortname to identify an entry within a folder, typically lowercase characters}}} \ - "name with help_text + optional" - - set f1 [$o create_raw_form_field -name test \ - -slot ::xowiki::Page::slot::description \ - -spec "textarea,cols=80,rows=2"] - ? {$f1 asWidgetSpec} \ - {text(textarea),nospell,optional {label #xowiki.Page-description#} {html {cols 80 rows 2 }} } \ - "textarea,cols=80,rows=2" - - set f2 [$o create_raw_form_field -name test \ - -slot ::xowiki::Page::slot::nls_language \ - -spec {select,options=[xowiki::locales]}] - ? {$f2 asWidgetSpec} \ - {text(select),optional {label #xowiki.Page-nls_language#} {options {[xowiki::locales]}} } \ - {select,options=[xowiki::locales]} - - - $o mixin ::xowiki::PodcastItem - set f3 [$o create_raw_form_field -name test \ - -slot ::xowiki::PodcastItem::slot::pub_date] - ? {$f3 asWidgetSpec} \ - {date,optional {label #xowiki.PodcastItem-pub_date#} {format {YYYY MM DD HH24 MI}} } \ - {date with format} - } } ::xo::library source_dependent