diff options
Diffstat (limited to 'test.tcl')
-rwxr-xr-x | test.tcl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test.tcl b/test.tcl new file mode 100755 index 0000000..290994c --- /dev/null +++ b/test.tcl @@ -0,0 +1,22 @@ +#!/bin/tclsh + +set tests { + {exec curl -i http://localhost:8000} + {exec curl -i http://localhost:8000/style.css} + {exec curl -i http://localhost:8000/index.html} +} + +if [expr ($argc == 0)] { + set j 0; + foreach i $tests { + puts "($j) : [string range $i 13 end]" + incr j + } +} elseif [expr ($argc == 1)] { + set a [lindex $argv 0]; + if { ($a >= 0) && ($a < [llength $tests]) } { + puts [eval [lindex $tests $a]] + } else { + puts "Argument not in range." + } +} |