Artifact 4058010f56a3cf9b24ea08bb3f17b496624e4be5:
- File
build/test/tests/17-zipseek.tcl
— part of check-in
[49d6a04e90]
at
2011-07-19 19:08:27
on branch trunk
— Updated to not force setting of starkit::topdir, this would break starkits
Updated zipseek test to use $tcl_library to find Tclkit root (user: rkeene, size: 389) [annotate] [blame] [check-ins using]
0000: 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 74 #!/usr/bin/env t 0010: 63 6c 73 68 0a 0a 23 20 4f 70 65 6e 20 73 6f 6d clsh..# Open som 0020: 65 20 66 69 6c 65 20 69 6e 73 69 64 65 20 74 68 e file inside th 0030: 65 20 74 63 6c 6b 69 74 20 74 68 61 74 20 77 69 e tclkit that wi 0040: 6c 6c 20 62 65 20 73 74 6f 72 65 64 20 69 6e 20 ll be stored in 0050: 63 6f 6d 70 72 65 73 73 65 64 20 66 6f 72 6d 0a compressed form. 0060: 73 65 74 20 66 64 20 5b 6f 70 65 6e 20 5b 66 69 set fd [open [fi 0070: 6c 65 20 6a 6f 69 6e 20 24 3a 3a 74 63 6c 5f 6c le join $::tcl_l 0080: 69 62 72 61 72 79 20 69 6e 69 74 2e 74 63 6c 5d ibrary init.tcl] 0090: 5d 0a 0a 67 65 74 73 20 24 66 64 20 6c 69 6e 65 ]..gets $fd line 00a0: 31 0a 0a 69 66 20 7b 5b 63 61 74 63 68 20 7b 73 1..if {[catch {s 00b0: 65 65 6b 20 24 66 64 20 30 7d 20 72 65 73 75 6c eek $fd 0} resul 00c0: 74 5d 7d 20 7b 0a 20 20 20 20 70 75 74 73 20 22 t]} {. puts " 00d0: 47 6f 74 3a 20 20 20 20 20 20 24 72 65 73 75 6c Got: $resul 00e0: 74 22 0a 20 20 20 20 70 75 74 73 20 22 45 78 70 t". puts "Exp 00f0: 65 63 74 65 64 3a 20 3c 4e 6f 20 45 72 72 6f 72 ected: <No Error 0100: 3e 22 0a 20 20 20 20 65 78 69 74 20 31 0a 7d 0a >". exit 1.}. 0110: 0a 67 65 74 73 20 24 66 64 20 73 74 72 0a 0a 69 .gets $fd str..i 0120: 66 20 7b 5b 73 74 72 69 6e 67 20 65 71 75 61 6c f {[string equal 0130: 20 24 73 74 72 20 24 6c 69 6e 65 31 5d 7d 20 7b $str $line1]} { 0140: 0a 20 20 20 20 65 78 69 74 20 30 0a 7d 0a 0a 70 . exit 0.}..p 0150: 75 74 73 20 22 47 6f 74 3a 20 20 20 20 20 20 24 uts "Got: $ 0160: 73 74 72 22 0a 70 75 74 73 20 22 45 78 70 65 63 str".puts "Expec 0170: 74 65 64 3a 20 24 6c 69 6e 65 31 22 0a 0a 65 78 ted: $line1"..ex 0180: 69 74 20 31 0a it 1.