Skip to content
Snippets Groups Projects
Unverified Commit 76a83148 authored by Michael Aaron Murphy's avatar Michael Aaron Murphy Committed by GitHub
Browse files

Merge pull request #605 from AgustinCB/documents-and-tests

Test and refactor of array methods
parents 0d53220a 0133cb00
No related branches found
No related tags found
No related merge requests found
echo @split("onetwoone", "two")
echo @split_at("onetwoone", "3")
echo @graphemes("onetwo", "3")
echo @bytes("onetwo")
echo @chars("onetwo")
one one
one twoone
o n e t w o
111 110 101 116 119 111
o n e t w o
......@@ -32,7 +32,7 @@ function check_return_value {
$PROJECT_DIR/target/debug/ion $1 1> $EXAMPLES_DIR/tmp.out 2> /dev/null
# Compare real and expected output
cmp --silent $EXAMPLES_DIR/tmp.out $EXPECTED_OUTPUT_FILE
diff "$EXAMPLES_DIR"/tmp.out "$EXPECTED_OUTPUT_FILE" > "$EXAMPLES_DIR"/diff_tmp
local RET=$?
# Clean up the mess
......@@ -40,9 +40,12 @@ function check_return_value {
# Write result
if [[ $RET -ne 0 ]]; then
cat "$EXAMPLES_DIR"/diff_tmp
rm "$EXAMPLES_DIR"/diff_tmp
echo -e "Test ${1} ${TAGFAIL}";
return 1;
else
rm "$EXAMPLES_DIR"/diff_tmp
echo -e "Test ${1} ${TAGPASS}";
return 0;
fi
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment