Changeset 1264 for trunk/lang/tcl/tests/encode.test
- Timestamp:
- Jan 7, 2009 9:31:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/tcl/tests/encode.test
r1042 r1264 29 29 test is-1.0.1 {Rappture::encoding::is, 0 arguments} { 30 30 list [catch {Rappture::encoding::is} msg] $msg 31 } {1 {wrong # args: should be "Rappture::encoding::is binary <string>"}}31 } {1 {wrong # args: should be "Rappture::encoding::is binary|encoded <string>"}} 32 32 33 33 test is-1.1.1 {Rappture::encoding::is, 1 incomplete subcommand} { 34 34 list [catch {Rappture::encoding::is binary} msg] $msg 35 } {1 {wrong # args: should be "Rappture::encoding::is binary <string>"}}35 } {1 {wrong # args: should be "Rappture::encoding::is binary|encoded <string>"}} 36 36 37 37 test is-1.1.2 {Rappture::encoding::is, 1 subcommand w/ string} { … … 47 47 test is-1.2.0 {Rappture::encoding::is, 1 invalid subcommand} { 48 48 list [catch {Rappture::encoding::is binaryy "hi"} msg] $msg 49 } {1 {bad option "binaryy": should be binary}}49 } {1 {bad option "binaryy": should be one of binary, encoded}} 50 50 51 51 test is-1.2.1 {Rappture::encoding::is, too many arguments} { 52 52 list [catch {Rappture::encoding::is binary binary "hi"} msg] $msg 53 } {1 {wrong # args: should be "Rappture::encoding::is binary <string>"}}53 } {1 {wrong # args: should be "Rappture::encoding::is binary|encoded <string>"}} 54 54 55 55 test is-1.2.2 {Rappture::encoding::is, with an embedded null} { 56 56 list [catch {Rappture::encoding::is binary "x\000x"} msg] $msg 57 } {0 yes} 58 59 test is-1.3.1 {Rappture::encoding::is, encoded subcommand w/ false string} { 60 list [catch {Rappture::encoding::is encoded "hi"} msg] $msg 61 } {0 no} 62 63 test is-1.3.2 {Rappture::encoding::is, encoded b64 flag and extra string} { 64 set h "@@RP-ENC:b64\nH4sIAAAAAAAAA8vIBACsKpPYAgAAAA==" 65 list [catch {Rappture::encoding::is encoded $h} msg] $msg 66 } {0 yes} 67 68 test is-1.3.3 {Rappture::encoding::is, encoded zb64 flag and extra string} { 69 set h "@@RP-ENC:zb64\nH4sIAAAAAAAAA8vIBACsKpPYAgAAAA==" 70 list [catch {Rappture::encoding::is encoded $h} msg] $msg 71 } {0 yes} 72 73 test is-1.3.4 {Rappture::encoding::is, encoded z flag and extra string} { 74 set h "@@RP-ENC:z\nH4sIAAAAAAAAA8vIBACsKpPYAgAAAA==" 75 list [catch {Rappture::encoding::is encoded $h} msg] $msg 76 } {0 yes} 77 78 test is-1.3.5 {Rappture::encoding::is, encoded z flag newline no string} { 79 set h "@@RP-ENC:z\n" 80 list [catch {Rappture::encoding::is encoded $h} msg] $msg 81 } {0 yes} 82 83 test is-1.3.6 {Rappture::encoding::is, encoded b64 flag newline no string} { 84 set h "@@RP-ENC:b64\n" 85 list [catch {Rappture::encoding::is encoded $h} msg] $msg 86 } {0 yes} 87 88 test is-1.3.7 {Rappture::encoding::is, encoded zb64 flag newline no string} { 89 set h "@@RP-ENC:zb64\n" 90 list [catch {Rappture::encoding::is encoded $h} msg] $msg 91 } {0 yes} 92 93 test is-1.3.7 {Rappture::encoding::is, encoded z flag no newline no string} { 94 set h "@@RP-ENC:zb64" 95 list [catch {Rappture::encoding::is encoded $h} msg] $msg 96 } {0 no} 97 98 test is-1.3.8 {Rappture::encoding::is, encoded b64 flag no newline no string} { 99 set h "@@RP-ENC:b64" 100 list [catch {Rappture::encoding::is encoded $h} msg] $msg 101 } {0 no} 102 103 test is-1.3.9 {Rappture::encoding::is, encoded zb64 flag no newline no string} { 104 set h "@@RP-ENC:zb64" 105 list [catch {Rappture::encoding::is encoded $h} msg] $msg 106 } {0 no} 107 108 test is-1.3.10 {Rappture::encoding::is, encoded with an embedded null} { 109 list [catch {Rappture::encoding::is encoded "@@RP-ENC:zb64\nx\000x"} msg] $msg 57 110 } {0 yes} 58 111
Note: See TracChangeset
for help on using the changeset viewer.