From: Laurent Mazet Date: Mon, 20 Feb 2023 16:31:58 +0000 (+0100) Subject: increase test coverage X-Git-Tag: v1.1~1 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=a41b348e4d97a6edd5420041f8b093fa585b5867;p=calc.git increase test coverage --- diff --git a/calc.c b/calc.c index 08ff10c..cd5defb 100644 --- a/calc.c +++ b/calc.c @@ -373,6 +373,7 @@ int main (int argc, char *argv[]) // test: echo -e '\t\t' | calc.exe | grep -q 'print' // test: echo -e '1 + 1;\nans + 1' | calc.exe | grep -qv 2 // test: echo -e 'mem\nmem (3)\nsto (4, pi)' | calc.exe | grep -q "error out of bound" +// test: echo -e 'mem (-1)' | calc.exe | grep -q "error" // test: echo -e 'sto (2, 3)\nmem (2)\ndisp' | calc.exe | grep -q 'storage: 0 3$' // test: echo -e 'disp' | calc.exe | grep -q "storage: 0 0 0 0 0 0 0 0 0 0" // test: echo -e 'sto (3, 10)\ndisp' | calc.exe | grep -q "storage: 0 0 10 0 0 0 0 0 0 0"