aboutsummaryrefslogtreecommitdiff
path: root/Practical2/tester/test.sh
diff options
context:
space:
mode:
authorCamil Staps2015-12-09 23:24:29 +0000
committerCamil Staps2015-12-09 23:24:29 +0000
commit71f8ddbaa83e15492401cb6fa6a7a2d54284f316 (patch)
treeb7554e9fcc25cc2c7b9117906da3d3b8b632e6ea /Practical2/tester/test.sh
parentRemoved redundant packages (diff)
Working solution Practical 2, small fixes
- Makefile: less dependent on program name - test.sh: quote variables - checkout.c: almost completely new algorithm. This one actually works. At least it does on the test cases.
Diffstat (limited to 'Practical2/tester/test.sh')
-rwxr-xr-xPractical2/tester/test.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Practical2/tester/test.sh b/Practical2/tester/test.sh
index 693ceda..4a982ac 100755
--- a/Practical2/tester/test.sh
+++ b/Practical2/tester/test.sh
@@ -22,7 +22,7 @@ for tc in "$samples/"*.in; do
result=$(eval "cat '$tc' | $cmd")
time_end=$(($(date +%s%N)/1000000))
time=`expr $time_end - $time_start`
- if [ $result != $answer ]; then
+ if [ "$result" != "$answer" ]; then
echo "failure ($time ms)."
failed=$(($failed+1))
else