From 1fe4710cab95bab13eba33a7e16148e4f4d0fd6f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 16 Oct 2009 17:13:34 +0000 Subject: [PATCH] test of GIVE 0 --- src/scripts/tests.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scripts/tests.lua b/src/scripts/tests.lua index 667d956a2..0e8a78b29 100644 --- a/src/scripts/tests.lua +++ b/src/scripts/tests.lua @@ -744,7 +744,11 @@ function test_give() u1:add_order("GIB " .. itoa36(u2.id) .. " 332 Silber") u2:clear_orders() u2:add_order("HELFE " .. itoa36(u1.faction.id) .. " GIB") + u2:add_item("horse", 100) + u2:add_order("GIB 0 ALLES PFERD") + local h = r:get_resource("horse") process_orders() + assert(r:get_resource("horse")>=h+100) assert(u1:get_item("money")==m1-332-10*u1.number) assert(u2:get_item("money")==m2+110-10*u2.number) end