فهرست منبع

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" ]
+}
+