X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=host%2Fget_test.rb;h=a08062aec6c2c7fff83e5332cd1fc714ace0a9b8;hb=6131049b56c13e49ea9546f18febf31c572917f4;hp=337ef3f4034bf7caf974e4f8cc314ee137b0a9be;hpb=5f46191d2615ebe2caa6e111b478031a34f20b9e;p=arm-crypto-lib.git diff --git a/host/get_test.rb b/host/get_test.rb index 337ef3f..a08062a 100644 --- a/host/get_test.rb +++ b/host/get_test.rb @@ -1,7 +1,7 @@ #!/usr/bin/ruby # get_test.rb =begin - This file is part of the AVR-Crypto-Lib. + This file is part of the ARM-Crypto-Lib. Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -18,6 +18,7 @@ along with this program. If not, see . =end +require 'rubygems' require 'serialport' def read_line(error_msg=true) @@ -26,7 +27,7 @@ def read_line(error_msg=true) puts("ERROR: read timeout!\n") if error_msg return nil end - s.gsub(/\006/, ''); + return s.delete("\006"); end def readTestVector(param) @@ -76,7 +77,7 @@ def readTestVector(param) set=m[1].to_i; print("\nSet "+m[1]+":"); end - if (m=/Set [0-9]*, vector#[\s]*([0-9]+):/.match(lb)) + if (m=/Set [0-9], vector#[\s]*([0-9]+):/.match(lb)) vector=m[1].to_i; #print(" "+m[1]); if(vector!=0 && vector % $linewidth==0)