From dee8250eef35c67a77fc0845948c3795cdf582bc Mon Sep 17 00:00:00 2001 From: Andrei Karas <akaras@inbox.ru> Date: Mon, 1 Feb 2016 16:45:28 +0300 Subject: Add format strings to tests. --- npc/test/test1.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/npc/test/test1.txt b/npc/test/test1.txt index bcb0e455..01d43ca3 100644 --- a/npc/test/test1.txt +++ b/npc/test/test1.txt @@ -29,6 +29,18 @@ test,10,5,0 script test1 NPC_HAT_BOX,{ if (.var != 4) mes "Error: testing test2 npc variables."; test1function; + if (l("test @@", "") != "test ") + mes "Error: format string 'l(\"test @@\", \"\")': " + l("test @@", ""); + if (l("test @@", "1") != "test 1") + mes "Error: format string 'l(\"test @@\", \"1\")': " + l("test @@", "1"); + if (l("@@", "") != "") + mes "Error: format string 'l(\"@@\", \"\")': " + l("@@", ""); + if (l("@@") != "@@") + mes "Error: format string 'l(\"@@\")': " + l("@@"); + if (l("@@ @@ @@", "this", "is", "test") != "this is test") + mes "Error: format string 'l(\"@@ @@ @@\", \"this\", \"is\", \"test\") != \"this is test\"': " + l("@@ @@ @@", "this", "is", "test"); + if (l("data @@ @@ @@ data", "this", "is", "test") != "data this is test data") + mes "Error: format string 'l(\"data @@ @@ @@ data\", \"this\", \"is\", \"test\")': " + l("data @@ @@ @@ data", "this", "is", "test"); mes "Tests complete."; close; -- cgit v1.2.3-70-g09d2