prog = "succ"
File.open("prog.iog", "w"){|f| f << prog }
output = `ruby main.rb prog.iog -- 9 10`
raise output if output != "10\n11\n"

`ghc -O engine.hs`
output = `(ruby main.rb prog.iog -e > test.ism && engine test.ism 9 10) 2>&1`
raise output if output != "10\n11\n"

prog = ",succ"
File.open("prog.iog", "w"){|f| f << prog }
output = `ruby main.rb prog.iog -- 9 10`
raise output if output != ":\n21\n"

output = `(ruby main.rb prog.iog -e > test.ism && engine test.ism 9 10) 2>&1`
raise output if output != ":\n21\n"

prog = "5>+"
File.open("prog.iog", "w"){|f| f << prog }
output = `ruby main.rb prog.iog --`
raise output if output != "10"

