From dcac7103b4e15b9ddd6173bb4f3f6a86f6f8263d Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Fri, 29 Dec 2023 10:51:29 +0100 Subject: [PATCH] correct a test --- calc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calc.c b/calc.c index 8ae39fe..869c00e 100644 --- a/calc.c +++ b/calc.c @@ -383,7 +383,7 @@ int main (int argc, char *argv[]) // test: echo -e 'set (0, -1)\nset (1, 2, 3, 3.11, pi, 4)\nlen' | calc.exe | grep -q '=> 6' // test: echo -e 'set (1, 2)\npop\npush (3)\nput (5, -1)\nlen\nshow\nget (3)\nquit' | calc.exe -n -v 3 | grep -q bye // test: echo -e 'put\nget\nget (1)\npop\nput (0)' | calc.exe | grep -c 'error' | xargs test 5 = -// test: echo -e 'push (2)' | calc.exe | grep -q '=> 2' +// test: echo -e 'push (1)\npush (2)' | calc.exe | grep -q '=> 2' // test: echo -e 'prog (1, {set (1, 2), push (arg (1)), show})\ncall (1, 10)\nprog (1, {mem (1), sto (1, cos (arg (1)))})\ncall (1, pi / 2)\ndel (1)' | calc.exe -n | grep -q 'stack: 1 2 10' // test: echo -e 'prog (1, {set (1, 2), push (arg (1)), show});\ncall (1, 10);\nshow\ndel (1)' | calc.exe -n | grep -q 'stack:$' // test: echo -e 'prog (1, {set (1, 2), push (arg (1)), show});\ncall (1, 10);\nlen' | calc.exe -n | grep -q '=> 0' -- 2.30.2