How would I go about testing a unix command like bc? For example;
philippe$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
2 + 2
4
3 * 10
30
10 / 5
2
-1
-1
I'm familiar with the modules subprocess and os in python. I also was reading about ScriptTest, but I don't know exactly how to use it ... What I need is to invoke the tool, then pass some operations like 2+2, get that result ... the remaining it's easy. I was wondering if there's a easier way to do it without too much parsing ...