summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-27 00:51:38 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-27 00:51:38 +0300
commit2b03ca19d5c741bea6c05735ec2342850c4dceef (patch)
tree8ccc08a5aea8b98c6b6a9675bfee17af45b1dbea
parentb4c88225242eb03e5a32b0dec5a9b8c7c67fd1d2 (diff)
downloadserverdata-2b03ca19d5c741bea6c05735ec2342850c4dceef.tar.gz
serverdata-2b03ca19d5c741bea6c05735ec2342850c4dceef.tar.bz2
serverdata-2b03ca19d5c741bea6c05735ec2342850c4dceef.tar.xz
serverdata-2b03ca19d5c741bea6c05735ec2342850c4dceef.zip
Add lg() into script engine tests.
-rw-r--r--npc/test/test1.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/npc/test/test1.txt b/npc/test/test1.txt
index a6e6d4b9..52f788bb 100644
--- a/npc/test/test1.txt
+++ b/npc/test/test1.txt
@@ -30,7 +30,7 @@ test,10,5,0 script test1 NPC_HAT_BOX,{
if (.var != 4)
mes "Error: testing test2 npc variables.";
test1function;
- mes "Formatting testing...";
+ mes "Formatting testing for sex: " + str(Sex);
if (l("test @@", "") != "test ")
mes "Error: format string 'l(\"test @@\", \"\")': " + l("test @@", "");
if (l("test @@", "1") != "test 1")
@@ -43,6 +43,26 @@ test,10,5,0 script test1 NPC_HAT_BOX,{
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");
+ if (l("test") != "test")
+ mes "Error: l(\"test\"): " + l("test");
+ if (Sex == 1)
+ {
+ if (lg("test") != "test#1")
+ mes "Error: lg(\"test\"): " + lg("test");
+ if (lg("test1", "test2") != "test2#1")
+ mes "Error: lg(\"test1\", \"test2\"): " + lg("test1", "test2");
+ if (lg("test1 @@", "test2 @@", "line") != "test2 line#1")
+ mes "Error: lg(\"test1 @@\", \"test2 @@\", \"line\"): " + lg("test1 @@", "test2 @@", "line");
+ }
+ else if (Sex == 0)
+ {
+ if (lg("test") != "test#0")
+ mes "Error: lg(\"test\"): " + lg("test");
+ if (lg("test1", "test2") != "test1#0")
+ mes "Error: lg(\"test1\", \"test2\"): " + lg("test1", "test2");
+ if (lg("test1 @@", "test2 @@", "line") != "test1 line#0")
+ mes "Error: lg(\"test1 @@\", \"test2 @@\", \"line\"): " + lg("test1 @@", "test2 @@", "line");
+ }
mes "Quest vars testing...";
.@time = 1000;
setq Test_testing1, 1, 2, 3, .@time;