We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d10c80b commit 5ff1307Copy full SHA for 5ff1307
1 file changed
tests/7z.tcl
@@ -26,10 +26,16 @@ if {![info exists Z7_PATH]} {
26
}}
27
}
28
puts "Test 7z-path: $Z7_PATH"
29
-if {[catch {exec $Z7_PATH} res]} {
30
- puts "Cannot test using \"$Z7_PATH\" (invalid platform?): $res"
31
- exit 0
32
-}
+
+# ensure we can test using executable from $Z7_PATH (valid platform, e. g. bypass cross-platform build):
+apply {{} {
+ variable Z7_PATH
33
+ if {[catch {exec $Z7_PATH} res opt]} {
34
+ puts "Cannot test using \"$Z7_PATH\" (invalid platform?): $res"
35
+ # 0 - by "invalid argument" (invalid platform), 1 - by other (unexpected) error
36
+ exit [expr {![string match {POSIX EINVAL *} [dict get $opt -errorcode]]}]
37
+ }
38
+}}
39
40
proc 7z {args} {
41
variable Z7_PATH
0 commit comments