summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-05-29 17:37:03 (GMT)
committersebres <sebres@users.sourceforge.net>2018-05-29 17:37:03 (GMT)
commit991ad56e9c0acfd48e8b1f7c12873e6722a3ebf1 (patch)
tree3d2c865f98dc42f16d6e2f3c0b809ec91aa3c687
parent371c0aec0b340482af2201edf522f8d036ed00cd (diff)
downloadtcl-991ad56e9c0acfd48e8b1f7c12873e6722a3ebf1.zip
tcl-991ad56e9c0acfd48e8b1f7c12873e6722a3ebf1.tar.gz
tcl-991ad56e9c0acfd48e8b1f7c12873e6722a3ebf1.tar.bz2
tests: sort test-files without extension (e. g. "clock" before "clock-ivm").
-rw-r--r--library/tcltest/tcltest.tcl15
1 files changed, 14 insertions, 1 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index f1b6082..8e3e505 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -2595,6 +2595,18 @@ proc tcltest::cleanupTests {{calledFromAllFile 0}} {
return
}
+proc tcltest::__SortFiles {lst} {
+ set slst {}
+ foreach f $lst {
+ lappend slst [list [file rootname $f] $f]
+ }
+ set lst {}
+ foreach f [lsort -dictionary -index 0 $slst] {
+ lappend lst [lindex $f 1]
+ }
+ return $lst
+}
+
#####################################################################
# Procs that determine which tests/test files to run
@@ -2659,7 +2671,8 @@ proc tcltest::GetMatchingFiles { args } {
PrintError "No test files remain after applying your match and\
skip patterns!"
}
- return $matchingFiles
+
+ return [__SortFiles $matchingFiles]
}
# tcltest::GetMatchingDirectories --