Skip to content

Commit

Permalink
[C Sample] Add run_sample script
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmojo committed Jan 17, 2025
1 parent a18638f commit 7b3f089
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Samples/Beyond.NET.Sample.C/run_sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -e

cd "bin"

output=$(./transform 'abc123üi')
expected_output=$(echo -e "Original: abc123üi\nTransformed: ABC123ÜI\nDestroying transformer")

if [ "${output}" == "${expected_output}" ]; then
echo "Success: Output is as expected."
echo "${output}"

exit 0
else
echo "Error: Output is not as expected."
echo ""
echo "Expected output:"
echo "${expected_output}"
echo ""
echo "Actual output:"
echo "${output}"

exit 1
fi

0 comments on commit 7b3f089

Please sign in to comment.