Add modeline and fix whitespace in test.tcl

This commit is contained in:
Ryan Schmidt
2020-06-16 23:15:29 -05:00
parent fb9e353d5f
commit 0e3de7ca65
2 changed files with 34 additions and 30 deletions
+26 -24
View File
@@ -1,34 +1,36 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
load ../machista.dylib
if {$argc < 1} {
puts "Usage: $argv0 filename"
exit 1
puts "Usage: $argv0 filename"
exit 1
}
set h [machista::create_handle]
for {set i 0} {$i < $argc} {incr i} {
puts [lindex $argv $i]
set rlist [machista::parse_file $h [lindex $argv $i]]
if {[lindex $rlist 0] == $machista::SUCCESS} {
set r [lindex $rlist 1]
set a [$r cget -mt_archs]
while {$a ne "NULL"} {
puts " Architecture: [$a cget -mat_arch]"
puts " install name: [$a cget -mat_install_name]"
puts " current version: [machista::format_dylib_version [$a cget -mat_version]]"
puts " compatibility version: [machista::format_dylib_version [$a cget -mat_comp_version]]"
set l [$a cget -mat_loadcmds]
while {$l ne "NULL"} {
puts " [$l cget -mlt_install_name] (current version [machista::format_dylib_version [$l cget -mlt_version]], compatibility version [machista::format_dylib_version [$l cget -mlt_comp_version]])"
set l [$l cget -next]
}
set a [$a cget -next]
}
} else {
puts "An error occured: [machista::strerror [lindex $rlist 0]]"
}
puts [lindex $argv $i]
set rlist [machista::parse_file $h [lindex $argv $i]]
if {[lindex $rlist 0] == $machista::SUCCESS} {
set r [lindex $rlist 1]
set a [$r cget -mt_archs]
while {$a ne "NULL"} {
puts " Architecture: [$a cget -mat_arch]"
puts " install name: [$a cget -mat_install_name]"
puts " current version: [machista::format_dylib_version [$a cget -mat_version]]"
puts " compatibility version: [machista::format_dylib_version [$a cget -mat_comp_version]]"
set l [$a cget -mat_loadcmds]
while {$l ne "NULL"} {
puts " [$l cget -mlt_install_name] (current version [machista::format_dylib_version [$l cget -mlt_version]], compatibility version [machista::format_dylib_version [$l cget -mlt_comp_version]])"
set l [$l cget -next]
}
set a [$a cget -next]
}
} else {
puts "An error occured: [machista::strerror [lindex $rlist 0]]"
}
}
machista::destroy_handle $h
+8 -6
View File
@@ -1,3 +1,5 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
package require tcltest 2
package require lambda
namespace import tcltest::*
@@ -8,17 +10,17 @@ set path [file dirname [file normalize $argv0]]
initial_setup
customMatch notGlob [lambda {needle haystack} {
puts "string match -nocase $needle"
if {[string match -nocase $needle $haystack]} {
return 0
}
return 1
puts "string match -nocase $needle"
if {[string match -nocase $needle $haystack]} {
return 0
}
return 1
}]
test svn-patchsites {
Regression test for svn-and-patchsites.
} -body {
return [exec -ignorestderr cat $path/$output_file]
return [exec -ignorestderr cat $path/$output_file]
} -result "error*" -match notGlob