summaryrefslogtreecommitdiff
path: root/npc/test
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-01 16:45:28 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-01 16:45:54 +0300
commitdee8250eef35c67a77fc0845948c3795cdf582bc (patch)
tree7b1f523164ac84d2fc0276596af0206332bd897b /npc/test
parentd1b7e97df27993974bd26626a57d2869d58b1780 (diff)
downloadserverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.gz
serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.bz2
serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.xz
serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.zip
Add format strings to tests.
Diffstat (limited to 'npc/test')
-rw-r--r--npc/test/test1.txt12
1 files changed, 12 insertions, 0 deletions
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;