From a3bdaf37b72013fe581f108c4798137e1ea267cd Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Sun, 30 Jun 2024 21:57:33 +1000 Subject: last commit of today; expanding on configuration and modules --- test.tcl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 test.tcl (limited to 'test.tcl') 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." + } +} -- cgit v1.2.3