2 lappend auto_path [file dirname [info script]]
5 if {$::tcl_platform(platform) eq "windows"} {
6 set prefix {//laputa/dist/magpro/FSB_CryptoPack_21.1/binaries}
8 set prefix {/net/laputa/pub/magpro/FSB_CryptoPack_21.1/binaries}
10 set PREFIX_ENV_NAME CALCHASH_PREFIX
12 puts stderr "Usage $argv0 path"
13 puts stderr "This script tests programms prefix/path/calchach and prefix/path/gostsum."
14 puts stderr "Defauld prefix is $prefix"
15 puts stderr "Prefix can be changes by envirament veriable $PREFIX_ENV_NAME"
19 if {[info exist env($PREFIX_ENV_NAME)]} {
20 set prefix $env($PREFIX_ENV_NAME)
22 set path [lindex $argv 0]
24 set testdir [exec hostname]-hashes
26 catch {file delete -force $testdir}
30 start_tests "Тесты для программ calchash и gostsum"
32 test -createsfiles dgst.dat "calchash" {
33 makeFile dgst.dat [string repeat "Test data to digest.\n" 100] binary
34 string match *DB9232D96CAE7AABA817350EF6CF4C25604D8FD36965F78CEB3CE59FD31CCB2A [exec $prefix/$path/calchash dgst.dat]
37 test -platform unix "gostsum (paramset cryptopro-A)" {
38 exec $prefix/$path/gostsum dgst.dat
39 } 0 "5c8621c036f8636fa3ea711a78e5051f607c87b4b715482af74b2b1cce62e442 dgst.dat"
42 test -platform unix "gostsum -t (paramset test)" {
43 exec $prefix/$path/gostsum -t dgst.dat
44 } 0 "db9232d96cae7aaba817350ef6cf4c25604d8fd36965f78ceb3ce59fd31ccb2a dgst.dat"