X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test%2F00-engine.t;h=e6685aac8360c551d8c806bb983a2a27a7f23cc3;hb=28e0ece4de8a6d5988b96ec08849ee1737633f9c;hp=3077093faf9770de0ccae249c2f08629a373cb22;hpb=6eb11c677ad3c948da4abdca45ff451f50f413c1;p=openssl-gost%2Fengine.git diff --git a/test/00-engine.t b/test/00-engine.t index 3077093..e6685aa 100644 --- a/test/00-engine.t +++ b/test/00-engine.t @@ -1,24 +1,25 @@ #!/usr/bin/perl -use Test::More tests => 5; +use Test2::V0; +plan(7); use Cwd 'abs_path'; # prepare data for -open F,">","testdata.dat"; -print F "12345670" x 128; -close F; +open (my $F,">","testdata.dat"); +print $F "12345670" x 128; +close $F; # Set OPENSSL_ENGINES environment variable to just built engine if(!defined $ENV{'OPENSSL_ENGINES'}){ $ENV{'OPENSSL_ENGINES'} = abs_path("../.libs"); } -$key='0123456789abcdef' x 2; +my $key='0123456789abcdef' x 2; # # You can redefine engine to use using ENGINE_NAME environment variable # -$engine=$ENV{'ENGINE_NAME'}||"gost"; +my $engine=$ENV{'ENGINE_NAME'}||"gost"; # Reopen STDERR to eliminate extra output open STDERR, ">>","tests.err"; @@ -32,6 +33,8 @@ if (exists $ENV{'OPENSSL_CONF'}) { # ${ENGINE_NAME}.info into this directory if you use this test suite # to test other engine implementing GOST cryptography. # +my $engine_info; + if ( -f $engine . ".info") { diag("Reading $engine.info"); open F, "<", $engine . ".info"; @@ -40,7 +43,7 @@ if ( -f $engine . ".info") { $engine_info= <","test.cnf"; -print F <","test.cnf"; +print $F <