one more test
authorLaurent Mazet <mazet@softndesign.org>
Sun, 31 Dec 2023 04:44:36 +0000 (05:44 +0100)
committerLaurent Mazet <mazet@softndesign.org>
Sun, 31 Dec 2023 04:44:36 +0000 (05:44 +0100)
calc.c

diff --git a/calc.c b/calc.c
index 869c00e43cda6e9e0926330ea8319dad17045004..a84a3005fb9c55439e67ba66369b6c157b2ca40a 100644 (file)
--- a/calc.c
+++ b/calc.c
@@ -361,6 +361,8 @@ int main (int argc, char *argv[])
 // test: echo -e 'si\t\t (pi / 2)' | calc.exe | grep -q '=> 1'
 // 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\nsto (4, pi)\ndisp' | calc.exe | grep -q "storage: 0 0 0 3.14159 0 0 0 0 0 0"
+// test: echo -e 'mem (0)\nsto (2, pi)\ndisp' | calc.exe | grep -q "storage: 0 3.14159 0 0 0 0 0 0 0 0"
 // 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$'