Skip to content

Commit 7b3f089

Browse files
committed
[C Sample] Add run_sample script
1 parent a18638f commit 7b3f089

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
cd "bin"
6+
7+
output=$(./transform 'abc123üi')
8+
expected_output=$(echo -e "Original: abc123üi\nTransformed: ABC123ÜI\nDestroying transformer")
9+
10+
if [ "${output}" == "${expected_output}" ]; then
11+
echo "Success: Output is as expected."
12+
echo "${output}"
13+
14+
exit 0
15+
else
16+
echo "Error: Output is not as expected."
17+
echo ""
18+
echo "Expected output:"
19+
echo "${expected_output}"
20+
echo ""
21+
echo "Actual output:"
22+
echo "${output}"
23+
24+
exit 1
25+
fi

0 commit comments

Comments
 (0)