Skip to content

Commit

Permalink
chore: fix strtok in test
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda authored and jaromil committed Mar 31, 2023
1 parent 5be7493 commit 53f41cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ cortex-m-crypto-integration = \
test/integration_asymmetric_crypto.sh ${1}

crypto-integration = \
$(call bats, test/vectors/sha.bats test/vectors/eddsa.bats test/vectors/qp.bats test/vectors/blake2.bats); \
$(call bats, test/vectors/sha.bats test/vectors/eddsa.bats test/vectors/qp.bats test/vectors/blake2.bats) || exit 1; \
cd test/crypto_json && ./run.sh ${1}; cd -; \
cd test/crypto_ecdh && ./run.sh ${1}; cd -;

Expand Down
2 changes: 1 addition & 1 deletion test/vectors/check_dilithium.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for line in newline_iter(DATA) do
if line:sub(1,1) ~= "#" then
local rule = strtok(line)

if #rule > 0 and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
if #rule > 0 and rule[1] ~= "" and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
curr_fields = curr_fields+1

test[rule[1]:lower()] = O.from_hex(rule[3])
Expand Down
2 changes: 1 addition & 1 deletion test/vectors/check_kyber.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for line in newline_iter(DATA) do
if line:sub(1,1) ~= "#" then
local rule = strtok(line)

if #rule > 0 and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
if #rule > 0 and rule[1] ~= "" and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
curr_fields = curr_fields+1

test[rule[1]:lower()] = O.from_hex(rule[3])
Expand Down
2 changes: 1 addition & 1 deletion test/vectors/check_sntrup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for line in newline_iter(DATA) do
if line:sub(1,1) ~= "#" then
local rule = strtok(line)

if #rule > 0 and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
if #rule > 0 and rule[1] ~= "" and rule[1]:lower() ~= "count" and rule[1]:lower() ~= "mlen" and rule[1]:lower() ~= "smlen" then
curr_fields = curr_fields+1

test[rule[1]:lower()] = O.from_hex(rule[3])
Expand Down

0 comments on commit 53f41cb

Please sign in to comment.