summaryrefslogtreecommitdiff
path: root/test/lib/library.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/library.exp')
-rw-r--r--test/lib/library.exp26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/lib/library.exp b/test/lib/library.exp
index e5ce9716..0e457c84 100644
--- a/test/lib/library.exp
+++ b/test/lib/library.exp
@@ -417,6 +417,16 @@ proc assert_exec {cmd {stdout ''} {test ''}} {
}; # assert_exec()
+# Sort list.
+# `exec sort' is used instead of `lsort' to achieve exactly the
+# same sort order as in bash.
+# @param list $items
+# @return list Sort list
+proc bash_sort {items} {
+ return [split [exec sort << [join $items "\n"]] "\n"]
+}; # bash_sort()
+
+
# Get hostnames
# @return list Hostnames
proc get_hosts {} {
@@ -467,16 +477,6 @@ proc get_signals {} {
}; # get_signals()
-# Sort list.
-# `exec sort' is used instead of `lsort' to achieve exactly the
-# same sort order as in bash.
-# @param list $items
-# @return list Sort list
-proc bash_sort {items} {
- return [split [exec sort << [join $items "\n"]] "\n"]
-}; # bash_sort()
-
-
# Initialize tcl globals with bash variables
proc init_tcl_bash_globals {} {
global BASH_VERSINFO BASH_VERSION COMP_WORDBREAKS
@@ -488,6 +488,12 @@ proc init_tcl_bash_globals {} {
}; # init_tcl_bash_globals()
+# Detect if test suite is running under Cygwin/Windows
+proc is_cygwin {} {
+ expr {[string first [string tolower [exec uname -s]] cygwin] >= 0}
+}; # is_cygwin()
+
+
# Expect items.
# Break items into chunks because `expect' seems to have a limited buffer size
# @param list $items