Changeset 424 for trunk/src/tcl/tests/diff.test
- Timestamp:
- May 1, 2006, 11:16:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tcl/tests/diff.test
r403 r424 28 28 catch {unset libDefault} 29 29 catch {unset libFromGet} 30 30 31 set lib [Rappture::library rplib_test.xml] 31 32 set libnew [Rappture::library rplib_test.xml] 32 33 set libDefault [Rappture::library rplib_test.xml] 33 34 set 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 41 test library-10.0.1.2 {diff command, no arguments} { 35 42 list [catch {$lib diff} msg] $msg 36 } {1 {wrong # args: should be "::libraryObj0 diff <xmlobj>"}}43 } {1 {wrong # args: should be "::libraryObj0 diff xmlobj"}} 37 44 test library-10.1.1 {diff command, one argument, no difference} { 38 45 $lib diff $libnew … … 48 55 $libFromGet diff $libDefault 49 56 } {+ 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} { 57 test 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} 62 test 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} 67 test library-10.3.1 {diff command, two arguments, returns error} { 51 68 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"}} 70 test 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"}} 73 test 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 53 78 54 79 ::tcltest::cleanupTests
Note: See TracChangeset
for help on using the changeset viewer.