1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
# -*- tcl -*-
# General set of error cases regarding the number of arguments.
test pt-tclparam-config-tcloo-1.0 {convert, wrong#args} -body {
pt::tclparam::configuration::tcloo def
} -returnCodes error -result {wrong # args: should be "pt::tclparam::configuration::tcloo def class pkg cmd"}
test pt-tclparam-config-tcloo-1.1 {convert, wrong#args} -body {
pt::tclparam::configuration::tcloo def C
} -returnCodes error -result {wrong # args: should be "pt::tclparam::configuration::tcloo def class pkg cmd"}
test pt-tclparam-config-tcloo-1.2 {convert, wrong#args} -body {
pt::tclparam::configuration::tcloo def C P
} -returnCodes error -result {wrong # args: should be "pt::tclparam::configuration::tcloo def class pkg cmd"}
test pt-tclparam-config-tcloo-2.0 {reset, wrong#args} -body {
pt::tclparam::configuration::tcloo def C P C XXX
} -returnCodes error -result {wrong # args: should be "pt::tclparam::configuration::tcloo def class pkg cmd"}
# -------------------------------------------------------------------------
# TODO :: Tests missing for: configure/cget, reset
# -------------------------------------------------------------------------
# Testing the generation of tcl/param output configured for tcloo.
TestFilesProcess $mytestdir ok peg_serial-canonical peg_tclparam-tcloo -> n label input data expected {
test pt-tclparam-config-tcloo-3.$n "pt::tclparam::configuration::tcloo, $label, ok :- $input" -setup {
pt::peg::to::tclparam reset
pt::peg::to::tclparam configure -name TEMPLATE
pt::peg::to::tclparam configure -file TEST
pt::tclparam::configuration::tcloo def \
PARSER OO_PACKAGE \
{pt::peg::to::tclparam configure}
} -body {
pt::peg::to::tclparam convert $data
} -cleanup {
pt::peg::to::tclparam reset
} -result $expected
}
#----------------------------------------------------------------------
unset n label input data expected
|