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/parent.test

    r403 r424  
    1818    namespace import -force ::tcltest::*
    1919}
     20
    2021catch {unset lib}
     22set lib [Rappture::library rplib_test.xml]
    2123
    2224#----------------------------------------------------------
     
    2527#----------------------------------------------------------
    2628test library-6.0.1 {parent command 0 arg} {
    27     catch {unset lib}
    28     set lib [Rappture::library rplib_test.xml]
    2929    $lib parent
    3030} {}
    3131test library-6.1.1 {parent command path as default 1 arg} {
    32     catch {unset lib}
    33     set lib [Rappture::library rplib_test.xml]
    3432    $lib parent "input"
    3533} {}
    3634test library-6.1.2 {parent command path w/ id as default 1 arg} {
    37     catch {unset lib}
    38     set lib [Rappture::library rplib_test.xml]
    3935    $lib parent "input.number(min)"
    4036} {input}
    4137test library-6.1.3 {parent command non-existant path 1 arg} {
    42     catch {unset lib}
    43     set lib [Rappture::library rplib_test.xml]
    4438    $lib parent "kdsf.werw(we12)"
    4539} {}
    4640test library-6.2.1 {parent command path 2 arg} {
    47     catch {unset lib}
    48     set lib [Rappture::library rplib_test.xml]
    4941    list [catch {$lib parent "input.number(min)" "wreew"} msg] $msg
    5042} {1 {wrong # args: should be "parent ?-as <fval>? ?<path>?"}}
    5143test library-6.3.1 {parent command path -as flag  no option} {
    52     catch {unset lib}
    53     set lib [Rappture::library rplib_test.xml]
    5444    list [catch {$lib parent -as} msg] $msg
    55 } {1 {bad flavor "" for -as: should be component, id, type, path, object}}
     45} {1 {bad flavor "" for -as: should be component, id, object, path, type}}
    5646test library-6.3.2 {parent command path -as flag component path with id} {
    57     catch {unset lib}
    58     set lib [Rappture::library rplib_test.xml]
    5947    $lib parent -as component "input.number(max).default"
    6048} {number(max)}
    6149test library-6.3.3 {parent command path -as flag id path with id} {
    62     catch {unset lib}
    63     set lib [Rappture::library rplib_test.xml]
    6450    $lib parent -as id "input.number(max).default"
    6551} {max}
    6652test library-6.3.4 {parent command path -as flag type path with id} {
    67     catch {unset lib}
    68     set lib [Rappture::library rplib_test.xml]
    6953    $lib parent -as type "input.number(max).default"
    7054} {number}
    7155test library-6.3.5 {parent command path -as path type path with id} {
    72     catch {unset lib}
    73     set lib [Rappture::library rplib_test.xml]
    7456    $lib parent -as path "input.number(max).default"
    75 } {.input.number(max)}
     57} {input.number(max)}
    7658test library-6.3.6 {parent command path -as object type path with id} {
    77     catch {unset lib}
    78     set lib [Rappture::library rplib_test.xml]
    7959    set libNew [$lib parent -as object "input.number(max).default"]
    8060    list [catch {$libNew isa ::Rappture::LibraryObj} msg] $msg
    8161} {0 1}
    8262test library-6.3.7 {parent command path -as junk type path with id} {
    83     catch {unset lib}
    84     set lib [Rappture::library rplib_test.xml]
    8563    list [catch {$lib parent -as junk "input.number(max)"} msg] $msg
    86 } {1 {bad flavor "junk" for -as: should be component, id, object, path, type}}
     64} {1 {bad flavor "junk": should be component, id, object, path, type}}
    8765test library-6.3.8 {parent command path -as component, path does not exist} {
    88     catch {unset lib}
    89     set lib [Rappture::library rplib_test.xml]
    9066    $lib parent -as component "input.test(we).current"
    9167} {}
    9268test library-6.3.9 {parent command path -as id, path does not exist} {
    93     catch {unset lib}
    94     set lib [Rappture::library rplib_test.xml]
    9569    $lib parent -as id "input.test(we).current"
    9670} {}
    9771test library-6.3.10 {parent command path -as type, path does not exist} {
    98     catch {unset lib}
    99     set lib [Rappture::library rplib_test.xml]
    10072    $lib parent -as type "input.test(we).current"
    10173} {}
    10274test library-6.3.11 {parent command path -as path, path does not exist} {
    103     catch {unset lib}
    104     set lib [Rappture::library rplib_test.xml]
    10575    $lib parent -as path "input.test(we).current"
    10676} {}
    10777test library-6.3.12 {parent command path -as object, path does not exist} {
    108     catch {unset lib}
    109     set lib [Rappture::library rplib_test.xml]
    11078    $lib parent -as object "input.test(we).current"
    111 } {::libraryObj18}
     79} {}
    11280test library-6.4.1 {parent command path -junk path} {
    113     catch {unset lib}
    114     set lib [Rappture::library rplib_test.xml]
    11581    list [catch {$lib parent -junk "input"} msg] $msg
    11682} {1 {bad option "-junk": should be -as}}
Note: See TracChangeset for help on using the changeset viewer.