Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix strtok in test #623

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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