From 6438d6807e409b3d7fcfaf8e53cad991fac6ade2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 26 Nov 2014 18:37:07 +0100 Subject: [PATCH] accepting Don's changes to the setup script. back-filling test for faction.get and get_faction. --- s/setup | 3 +++ scripts/tests/faction.lua | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/s/setup b/s/setup index 9b6202099..1cb6a1867 100755 --- a/s/setup +++ b/s/setup @@ -91,4 +91,7 @@ ini_add lua install $SOURCE ini_add lua paths $SOURCE/scripts:$SOURCE/lunit ini_add lua rules $rules +ln -f $SOURCE/bin/eressea ln -f $SOURCE/scripts/run-turn.lua +ln -f $SOURCE/scripts/reports.lua +ln -f $SOURCE/scripts/config.lua diff --git a/scripts/tests/faction.lua b/scripts/tests/faction.lua index cd414d60d..a6a07a6e1 100644 --- a/scripts/tests/faction.lua +++ b/scripts/tests/faction.lua @@ -18,3 +18,11 @@ function test_faction_flags() f.flags = 42 assert_equal(42, f.flags) end + +function test_get_faction() + assert_equal(f, get_faction(f.id)) + assert_equal(f, faction.get(f.id)) + local nf = f.id + if nf>1 then nf = nf - 1 else nf = 1 end + assert_equal(nil, faction.get(nf)) +end