From: Victor Wagner Date: Thu, 1 Oct 2015 09:35:20 +0000 (+0300) Subject: Added binmode to file creation code X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=0fd84c8144c5291fc3b1887204e571e731959a0b;p=openssl-gost%2Fengine.git Added binmode to file creation code --- diff --git a/test/01-digest.t b/test/01-digest.t index e87c8ff..c762dc2 100644 --- a/test/01-digest.t +++ b/test/01-digest.t @@ -5,6 +5,7 @@ use Cwd 'abs_path'; # prepare data for open F,">","testdata.dat"; +binmode F; print F "12345670" x 128; close F; # Set OPENSSL_ENGINES environment variable to just build engine @@ -29,6 +30,7 @@ is(`openssl dgst -engine ${engine} -md_gost12_512 testdata.dat`, unlink("testdata.dat"); open F,">","testdata2.dat"; +binmode F; print F "\x00\x01\x02\x15\x84\x67\x45\x31" x 128; close F; @@ -47,6 +49,7 @@ is(`openssl dgst -engine ${engine} -md_gost12_512 testdata2.dat`, unlink("testdata2.dat"); open F, ">","testdata3.dat"; +binmode F; print F substr("12345670" x 128,0,539); close F; @@ -64,6 +67,7 @@ is(`openssl dgst -engine ${engine} -md_gost12_512 testdata3.dat`, unlink "testdata3.dat"; open F , ">","bigdata.dat"; +binmode F; print F ("121345678" x 7 . "1234567\n") x 4096,"12345\n"; close F;