correct somes tests
authorLaurent Mazet <mazet@softndesign.org>
Thu, 2 Feb 2023 22:03:31 +0000 (23:03 +0100)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 2 Feb 2023 22:03:31 +0000 (23:03 +0100)
calc.c

diff --git a/calc.c b/calc.c
index 31cd1420daffd15850f76112c771114ae325d935..808aff56cb1cf1ff37ce5238363c7ab2a3cc12cf 100644 (file)
--- a/calc.c
+++ b/calc.c
@@ -304,7 +304,7 @@ int main (int argc, char *argv[])
 // test: echo "cos (1, 2)" | calc.exe | grep -q 'error'
 // test: echo "sqrt 2" | calc.exe | grep -q 'error'
 // test: echo "pow (2)" | calc.exe | grep -q 'error'
-// test: echo "1.23456789" | calc.exe -p 3 | grep -q '1\.234'
+// test: echo "1.23456789" | calc.exe -p 4 | grep -q '=> 1\.235'
 // test: echo . | calc.exe
 // test: echo -e '1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1\n1 + 1' | calc.exe -n | grep -q 64
 // test: echo -e '1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1\n1 + 1' | calc.exe -n | grep -q 2
@@ -367,6 +367,7 @@ int main (int argc, char *argv[])
 // test: echo -e '1 }\n1 )\n1 , 2\n ' | calc.exe | grep -c error | xargs test 3 =
 // test: echo -e 'print (1)\nquit' | calc.exe -v 3 | grep -q Print
 // 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 (3)\nsto (4, pi)' | calc.exe | grep -q "invalid index"
 // test: echo -e 'sto (2, 3)\nmem (2)\ndisp' | calc.exe | grep -q 'storage: 0 3$'