condition feature
[calc.git] / calc.c
diff --git a/calc.c b/calc.c
index 67c4b2e11eabbf3cbd9c571859bcdae2d278db98..4ced168785a883f40544b16ddb8876083f8cc625 100644 (file)
--- a/calc.c
+++ b/calc.c
@@ -283,5 +283,9 @@ int main (int argc, char *argv[])
 // test: echo -e 'cos (quit)' | calc.exe 2>&1 | grep -q error
 // test: echo -e '(quit)' | calc.exe 2>&1 | grep -q error
 // test: echo -e 'cos 3.14\n!\n! 3 4' | calc.exe 2>&1 | grep -c error | xargs test 3 =
+// test: echo -e 'sto (2, pi)\ncond (rcl (2) > 2, log (64), exp (75))' | calc.exe  | grep -q '=> 4\.15888'
+// test: echo -e 'sto (2, 1)\ncond (rcl (2) > 2, log (64), exp (75 / 10))' | calc.exe  | grep -q '=> 1808\.04'
+// test: echo -e 'cond (0, 1, 2)' | calc.exe -v 3 | grep -q Cond
+// test: echo -e 'cond\ncond (\ncond (1 >0,'| calc.exe 2>&1 | grep -c error | xargs test 3 =
 
 /* vim: set ts=4 sw=4 et: */