X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=tcl_tests%2Ftest.tcl;h=e281f1a729c3d5c26c0d006fbbbdc502e50957b9;hb=655876655d0a3ab1a7898331c0b5187db6e843ad;hp=8e2b45a7556b7f4e6c233b6aa4adae952ad6ed1d;hpb=3b8ddfe2f303b8931842e52bdb5c07c97042f651;p=openssl-gost%2Fengine.git diff --git a/tcl_tests/test.tcl b/tcl_tests/test.tcl index 8e2b45a..e281f1a 100644 --- a/tcl_tests/test.tcl +++ b/tcl_tests/test.tcl @@ -1,4 +1,3 @@ -# -*- coding: cp1251 -*- # Установка номера тестового ПРА namespace eval vizir { @@ -109,7 +108,7 @@ namespace eval test { } set test_id [file rootname [file tail [info script]]]$suffix set stat [open "stats" a] - fconfigure $stat -encoding cp1251 + fconfigure $stat -encoding utf-8 puts $stat [list $test_id [rus $t_name] $no $ok $failed $p_skip $c_skip] close $stat if {!$failed} { @@ -118,7 +117,10 @@ namespace eval test { if [info exists $file] {puts [test_log] "Deleting $file" file delete $file} } - } + } { + # signal to a caller that we had failures + exit 1 + } } # # Вовзращает идентификатор канала, куда пишется лог тестов. @@ -263,21 +265,8 @@ proc listcompare {list1 list2 time} { } return 1 } -# Перекодирует строку из кодировки скрипта (assumed 1251) -# в текущую системную - -if {[encoding system] == "utf-8" } { - proc rus {string} { - return [encoding convertfrom cp1251 $string] -} - -} else { - -proc rus {string} " - return \[encoding convertfrom cp1251 \[encoding convertto [encoding system] \$string\]\] -" - + return $string } # # Пишет строку в лог @@ -296,7 +285,7 @@ proc rus {string} " puts -nonewline [rus [format "Тест%5d: %-60s:" $no [string range $testname 0 59]]] flush stdout set curtest $testname - log [rus "Тест $no: $testname start"] + log [rus "\n\nТест $no: $testname start"] } # # Вызывается при пропуске теста