From 71f8ddbaa83e15492401cb6fa6a7a2d54284f316 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 9 Dec 2015 23:24:29 +0000 Subject: 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. --- Practical2/tester/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Practical2/tester') 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 -- cgit v1.2.3