diff --git a/conf/e3/config.json b/conf/e3/config.json index d28dda80f..d831a0b3e 100644 --- a/conf/e3/config.json +++ b/conf/e3/config.json @@ -1,6 +1,7 @@ { "include": [ "keywords.json", + "prefixes.json", "e3/terrains.json" ], "settings": { diff --git a/conf/e3/config.xml b/conf/e3/config.xml index f1f403ecd..663b56d26 100644 --- a/conf/e3/config.xml +++ b/conf/e3/config.xml @@ -6,7 +6,6 @@ - diff --git a/scripts/tests/common.lua b/scripts/tests/common.lua index 8ca7e478e..9c2549261 100644 --- a/scripts/tests/common.lua +++ b/scripts/tests/common.lua @@ -1085,3 +1085,29 @@ function test_parser() os.remove(filename) assert_equal("Goldene Herde", u.name) end + +local function set_order(u, str) + u:clear_orders() + u:add_order(str) +end + +function test_prefix() + local r0 = region.create(0, 0, "plain") + local f1 = faction.create("noreply@eressea.de", "human", "de") + local u1 = unit.create(f1, r0, 1) + + set_order(u1, "PRAEFIX See") + process_orders() + assert_not_nil(u1:show():find("Seemensch")) + + u1.race = "elf" + assert_not_nil(u1:show():find("Seeelf")) + + set_order(u1, "PRAEFIX Mond") + process_orders() + assert_not_nil(u1:show():find("Mondelf")) + + set_order(u1, "PRAEFIX") + process_orders() + assert_not_nil(u1:show():find("Elf")) +end diff --git a/scripts/tests/e2/e2features.lua b/scripts/tests/e2/e2features.lua index a80e6390e..f5e40d42a 100644 --- a/scripts/tests/e2/e2features.lua +++ b/scripts/tests/e2/e2features.lua @@ -335,29 +335,3 @@ function test_stonegolems() assert_equal(1 ,u2.number, "There shoud be one Stone Golems") -- end test Stone Golems four stones end - -local function set_order(u, str) - u:clear_orders() - u:add_order(str) -end - -function test_prefix() - local r0 = region.create(0, 0, "plain") - local f1 = faction.create("noreply@eressea.de", "human", "de") - local u1 = unit.create(f1, r0, 1) - - set_order(u1, "PRAEFIX See") - process_orders() - assert_not_nil(u1:show():find("Seemensch")) - - u1.race = "elf" - assert_not_nil(u1:show():find("Seeelf")) - - set_order(u1, "PRAEFIX Mond") - process_orders() - assert_not_nil(u1:show():find("Mondelf")) - - set_order(u1, "PRAEFIX") - process_orders() - assert_not_nil(u1:show():find("Elf")) -end diff --git a/tests/data/inactive b/tests/data/inactive new file mode 100644 index 000000000..38dd0ad9a --- /dev/null +++ b/tests/data/inactive @@ -0,0 +1 @@ +c93c:Menschen:1:4