unexpected return from lua test should not return exit status 0
authorsheepluva
Wed, 03 Dec 2014 18:18:37 +0100
changeset 10619 ee460883729e
parent 10618 7b72cf27cd04
child 10620 0f7dedda093b
unexpected return from lua test should not return exit status 0
hedgewars/hwengine.pas
hedgewars/uConsts.pas
--- a/hedgewars/hwengine.pas	Wed Dec 03 17:59:31 2014 +0100
+++ b/hedgewars/hwengine.pas	Wed Dec 03 18:18:37 2014 +0100
@@ -587,6 +587,18 @@
         halt(HaltUsageError);
         {$ENDIF}
 
+    if cTestLua then
+        {$IFDEF PAS2C}
+        exit(HaltTestUnexpected);
+        {$ELSE}
+        halt(HaltTestUnexpected);
+        {$ENDIF}
+
+    {$IFDEF PAS2C}
+    exit(HaltNoError);
+    {$ELSE}
+    halt(HaltNoError);
+    {$ENDIF}
 {$IFDEF HWLIBRARY}
 end;
 {$ENDIF}
--- a/hedgewars/uConsts.pas	Wed Dec 03 17:59:31 2014 +0100
+++ b/hedgewars/uConsts.pas	Wed Dec 03 18:18:37 2014 +0100
@@ -36,6 +36,7 @@
     HaltTestSuccess     =  0;
     HaltTestFailed      =  10;
     HaltTestLuaError    =  11;
+    HaltTestUnexpected  =  12;
 
 
     sfMax = 1000;