increase test coverage
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 20 Feb 2023 16:31:58 +0000 (17:31 +0100)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 20 Feb 2023 16:31:58 +0000 (17:31 +0100)
calc.c

diff --git a/calc.c b/calc.c
index 08ff10c14308c34769a49fb69af5111c367033a9..cd5defb646aaf2c99ff7ff6fc323857219d03612 100644 (file)
--- 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"