Ignore:
Timestamp:
May 1, 2006, 11:16:11 PM (18 years ago)
Author:
dkearney
Message:

added some changes for tcl bindings that i've been holding onto for the last few weeks, still testing and changing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tcl/tests/diff.test

    r403 r424  
    2828catch {unset libDefault}
    2929catch {unset libFromGet}
     30
    3031set lib [Rappture::library rplib_test.xml]
    3132set libnew [Rappture::library rplib_test.xml]
    3233set libDefault [Rappture::library rplib_test.xml]
    3334set libFromGet [$libDefault element -as object "input.number(max)"]
    34 test library-10.0.1 {diff command, no arguments} {
     35
     36# this test works for old tcl bindings, different error message
     37#test library-10.0.1.1 {diff command, no arguments} {
     38#    list [catch {$lib diff} msg] $msg
     39#} {1 {wrong # args: should be "libraryObj0 diff libobj"}}
     40# this test works for new tcl bindings, different error message
     41test library-10.0.1.2 {diff command, no arguments} {
    3542    list [catch {$lib diff} msg] $msg
    36 } {1 {wrong # args: should be "::libraryObj0 diff <xmlobj>"}}
     43} {1 {wrong # args: should be "::libraryObj0 diff xmlobj"}}
    3744test library-10.1.1 {diff command, one argument, no difference} {
    3845    $lib diff $libnew
     
    4855    $libFromGet diff $libDefault
    4956} {+ input.string(formula) dsd234ssdf3sdf {} + input.string(name) tnerruc {} + input.number(min) 1 {} + input.number(max) 3 {}}
    50 test library-10.2.1 {diff command, two arguments, returns error} {
     57test library-10.2.1 {diff command, one argument} {
     58    set lib1021 [Rappture::library rplib_test.xml]
     59    $lib1021 put input.number(max).current "5"
     60    $libDefault diff $lib1021
     61} {c input.number(max) 3 5}
     62test library-10.2.2 {diff command, one argument} {
     63    set lib1022 [Rappture::library rplib_test.xml]
     64    $lib1022 put input.number(max).new "5"
     65    $libDefault diff $lib1022
     66} {c input.number(max) 3 5}
     67test library-10.3.1 {diff command, two arguments, returns error} {
    5168    list [catch {$lib diff $libnew $libnew} msg] $msg
    52 } {1 {wrong # args: should be "::libraryObj0 diff <xmlobj>"}}
     69} {1 {wrong # args: should be "::libraryObj0 diff xmlobj"}}
     70test library-10.3.2 {diff command, bad second arg, returns error} {
     71    list [catch {$lib diff slfd} msg] $msg
     72} {1 {invalid command name "slfd"}}
     73test library-10.4.1 {diff command, bad second arg, returns error} {
     74    set slfd 40
     75    list [catch {$lib diff $slfd} msg] $msg
     76} {1 {invalid command name "40"}}
     77# no tests for xmlobj's that are not Rappture Libraries yet
    5378
    5479::tcltest::cleanupTests
Note: See TracChangeset for help on using the changeset viewer.