X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=calc.c;h=1432acc275fb7c496e29b3b024da4db6783364df;hb=11a49e35ce89943098835ba6d5b3f1252c2d6b8c;hp=08ff10c14308c34769a49fb69af5111c367033a9;hpb=bdcb95da42ef20e0385e0c0404cb25844c3bb137;p=calc.git diff --git a/calc.c b/calc.c index 08ff10c..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 @@ -373,6 +373,7 @@ int main (int argc, char *argv[]) // 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\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"