Fossil SCM

Make tester.tcl reject unknown options with a message

danshearer 2026-11-27 22:20 UTC test-suite-new
Commit 80e92738a38a38d304b9c71efbd66d569b917a5e6b537dccbbfaa4119561f78c
1 file changed +11
--- test/tester.tcl
+++ test/tester.tcl
@@ -115,10 +115,21 @@
115115
puts stderr "-assurance requires smoke, ci, or stress"
116116
exit 1
117117
}
118118
set argv [lreplace $argv $i [expr {$i + 1}]]
119119
}
120
+
121
+# The options above have been removed from argv, and each remaining
122
+# element of argv is the name of a test file.
123
+foreach arg $argv {
124
+ if {[string match -* $arg]} {
125
+ puts stderr "unknown or repeated option: $arg"
126
+ puts stderr "options are: -keep -halt -prot -verbose -quiet -strict\
127
+ -trials N -assurance smoke|ci|stress"
128
+ exit 1
129
+ }
130
+}
120131
121132
if {[llength $argv]==0} {
122133
foreach f [lsort [glob $testfiledir/*.test]] {
123134
set base [file root [file tail $f]]
124135
lappend argv $base
125136
--- test/tester.tcl
+++ test/tester.tcl
@@ -115,10 +115,21 @@
115 puts stderr "-assurance requires smoke, ci, or stress"
116 exit 1
117 }
118 set argv [lreplace $argv $i [expr {$i + 1}]]
119 }
 
 
 
 
 
 
 
 
 
 
 
120
121 if {[llength $argv]==0} {
122 foreach f [lsort [glob $testfiledir/*.test]] {
123 set base [file root [file tail $f]]
124 lappend argv $base
125
--- test/tester.tcl
+++ test/tester.tcl
@@ -115,10 +115,21 @@
115 puts stderr "-assurance requires smoke, ci, or stress"
116 exit 1
117 }
118 set argv [lreplace $argv $i [expr {$i + 1}]]
119 }
120
121 # The options above have been removed from argv, and each remaining
122 # element of argv is the name of a test file.
123 foreach arg $argv {
124 if {[string match -* $arg]} {
125 puts stderr "unknown or repeated option: $arg"
126 puts stderr "options are: -keep -halt -prot -verbose -quiet -strict\
127 -trials N -assurance smoke|ci|stress"
128 exit 1
129 }
130 }
131
132 if {[llength $argv]==0} {
133 foreach f [lsort [glob $testfiledir/*.test]] {
134 set base [file root [file tail $f]]
135 lappend argv $base
136

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button