diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-01 16:45:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-01 16:45:54 +0300 |
commit | dee8250eef35c67a77fc0845948c3795cdf582bc (patch) | |
tree | 7b1f523164ac84d2fc0276596af0206332bd897b | |
parent | d1b7e97df27993974bd26626a57d2869d58b1780 (diff) | |
download | serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.gz serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.bz2 serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.tar.xz serverdata-dee8250eef35c67a77fc0845948c3795cdf582bc.zip |
Add format strings to tests.
-rw-r--r-- | npc/test/test1.txt | 12 |
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; |