X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=calc.c;h=1432acc275fb7c496e29b3b024da4db6783364df;hb=11a49e35ce89943098835ba6d5b3f1252c2d6b8c;hp=7476252d1c42312ffd17042e69c0cfb3bcf0ffbc;hpb=e877b1ac3005fbbdb1702aec48be80908a8048ee;p=calc.git diff --git a/calc.c b/calc.c index 7476252..1432acc 100644 --- a/calc.c +++ b/calc.c @@ -1,6 +1,6 @@ /* depend: */ /* cflags: */ -/* linker: alloc.o argument.o debug.o element.o format.o parser.o program.o stack.o storage.o tabular.o workspace.o -lm -lreadline */ +/* linker: alloc.o argument.o color.o debug.o element.o format.o parser.o program.o stack.o storage.o tabular.o workspace.o -lm -lreadline */ #include #include @@ -372,7 +372,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 (3)\nsto (4, pi)' | calc.exe | grep -q error +// 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"