From: Laurent Mazet Date: Tue, 7 Mar 2023 22:39:29 +0000 (+0100) Subject: fix some tests X-Git-Tag: v1.2 X-Git-Url: https://secure.softndesign.org/git/?p=calc.git;a=commitdiff_plain;h=692235c56f1c70c4361d672f8c2b363ca212b00b fix some tests --- diff --git a/calc.c b/calc.c index 5014f3e..98ca963 100644 --- a/calc.c +++ b/calc.c @@ -388,11 +388,11 @@ int main (int argc, char *argv[]) // test: echo -e 'set (1, 2, -5, 6, -8, 9, -2, 23, 4)\nmin (5, -3)\nmax (-1)\nmin\nmean\nmed\nmax\nord\nprod\nsum\nvar\nquit' | calc.exe -n -v 3 | grep -q bye // test: echo -e 'min\nmean\nmed\nmax\nprod\nsum\nvar\nord\nset (1)\nord' | calc.exe -n | grep -c error | xargs test 9 = // test: echo -e 'prog (1, cos(pi * arg (1))) / 4' | calc.exe | grep -c error | xargs test 1 = -// test: echo -e 'format\n.12345678901' | calc.exe | grep -n '=> 6' -// test: echo -e 'format (8)\n.12345678901' | calc.exe | grep -n '=> 0.12345679' -// test: echo -e 'format (12)\n.12345678901' | calc.exe | grep -n '=> 0.12345678901' -// test: echo -e 'format (4)\n.12345678901\format' | calc.exe | grep -n '=> 4' -// test: echo -e 'format (0)' | calc.exe | grep -n 'error' +// test: echo -e 'format\n.12345678901' | calc.exe | grep -q '=> 6' +// test: echo -e 'format (8)\n.12345678901' | calc.exe | grep -q '=> 0.12345679' +// test: echo -e 'format (12)\n.12345678901' | calc.exe | grep -q '=> 0.12345678901' +// test: echo -e 'format (4)\n.12345678901\format' | calc.exe | grep -q '=> 4' +// test: echo -e 'format (0)' | calc.exe | grep -q 'error' // test: echo -e 'ff + ff' | calc.exe -b 16 | grep -q '=> 1fe' // test: echo -e '60 / 4' | calc.exe -b 8 | grep -q '=> 14' // test: echo -e 'z00-z0+1-2*z+20x' | calc.exe -b 36 | grep -q '=> 1000'