Skip to content

Commit

Permalink
fix(given): 🐛 substitute spaces with underscores in name
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-cristino authored and jaromil committed Feb 7, 2023
1 parent 0846bad commit c2f9e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lua/zencode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function Iam(name)
if name then
ZEN.assert(not WHO, 'Identity already defined in WHO')
ZEN.assert(type(name) == 'string', 'Own name not a string')
WHO = name
WHO = uscore(name)
else
ZEN.assert(WHO, 'No identity specified in WHO')
end
Expand Down
6 changes: 3 additions & 3 deletions test/zencode/given.bats
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ EOF
cat <<EOF | save_asset name_named_in.data
{
"UserData": {
"Sender": "Alice"
"Sender": "Alice in wonderland"
},
"Alice": {
"Alice in wonderland": {
"keyring": {
"ecdh": "2mZDRS1rE4jT5EuozwZfbS+GLE7ogBfgWOr30wXoe3g="
}
Expand All @@ -311,7 +311,7 @@ Given that I have my 'keyring'
Then print my 'keyring'
EOF
save_output 'name_named_in.json'
assert_output '{"Alice":{"keyring":{"ecdh":"2mZDRS1rE4jT5EuozwZfbS+GLE7ogBfgWOr30wXoe3g="}}}'
assert_output '{"Alice_in_wonderland":{"keyring":{"ecdh":"2mZDRS1rE4jT5EuozwZfbS+GLE7ogBfgWOr30wXoe3g="}}}'
}


Expand Down

0 comments on commit c2f9e8f

Please sign in to comment.