Browse Source

alignment of tests and new zencode

master
Jaromil 3 years ago
parent
commit
c4e9bd8e01
  1. 4
      test/utils.sh
  2. 6
      test/zencode_enchash.sh

4
test/utils.sh

@ -2,7 +2,7 @@ set -e
set -o pipefail
detect_zenroom_path() {
zenroom_paths=( "$PWD" "$PWD/../../src" "$PWD/src" "/usr/local/bin" "$PWD/../.." )
zenroom_paths=( "$PWD" "$PWD/../../src" "$PWD/../src" "$PWD/src" "/usr/local/bin" "$PWD/../.." "$PWD/.." )
zenroom_path="/usr/local/bin/zenroom"
case $OSTYPE in
linux*)
@ -44,7 +44,9 @@ detect_zenroom_path() {
exit 1
fi
chmod +x $zenroom_path
>&2 echo
>&2 echo "Zenroom exec: $zenroom_path"
>&2 echo
echo "$zenroom_path"
unset zenroom_paths zenroom_path
}

6
test/zencode_enchash.sh

@ -8,7 +8,7 @@ t=`mktemp -d`
cat <<EOF | zenroom -z | tee $t/hex.json
rule output encoding hex
Given nothing
When I write 'a string to be hashed' in 'source'
When I write string 'a string to be hashed' in 'source'
and I create the hash of 'source'
Then print the 'hash'
EOF
@ -27,7 +27,7 @@ EOF
cat <<EOF | zenroom -z | tee $t/base64.json
rule output encoding base64
Given nothing
When I write 'a string to be hashed' in 'source'
When I write string 'a string to be hashed' in 'source'
and I create the hash of 'source' using 'sha512'
Then print the 'hash'
EOF
@ -36,7 +36,7 @@ EOF
cat <<EOF | zenroom -z | tee $t/url64.json
rule output encoding url64
Given nothing
When I write 'a string to be hashed' in 'source'
When I write string 'a string to be hashed' in 'source'
and I create the hash of 'source' using 'sha256'
Then print the 'hash'
EOF

Loading…
Cancel
Save