浏览代码

Add mixed operation with + - * /

DricomDragon 5 年之前
父节点
当前提交
62ba9a55bf
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      test.bats

+ 5 - 0
test.bats

@@ -66,3 +66,8 @@
 	[ "$result" = "4" ]
 }
 
+@test "Mixed operation with * + / -" {
+	result="$(echo '15 * (1 + 1 + 1 + 4 - 2*2) / 3 / 15 =' | ./eval.out)"
+	[ "$result" = "1" ]
+}
+