From 23357edfe637b5a4f1b4bbd735eb9368f4760c13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?=
 <janis.daehne2@student.uni-halle.de>
Date: Fri, 22 Feb 2019 18:13:42 +0100
Subject: [PATCH] - we now use number (received as string) for
 showTestRunnerDebugOutput

---
 bootstrap.php            | 2 +-
 do_blackBoxTest_func.php | 2 +-
 do_compileTest_func.php  | 2 +-
 readme.md                | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bootstrap.php b/bootstrap.php
index db89437..05dc1c2 100644
--- a/bootstrap.php
+++ b/bootstrap.php
@@ -68,6 +68,6 @@ $config['maxLinesToRead'] = $row['maxLinesToRead'];
 
 $config['maxErrLinesToRead'] = $row['maxErrLinesToRead'];
 $config['maxLinesToWrite'] = $row['maxLinesToWrite'];
-$config['showTestRunnerDebugOutput'] = $row['showTestRunnerDebugOutput'] === 1;
+$config['showTestRunnerDebugOutput'] = $row['showTestRunnerDebugOutput'] === '1';
 
 return $config;
\ No newline at end of file
diff --git a/do_blackBoxTest_func.php b/do_blackBoxTest_func.php
index 08e127c..f91df7e 100644
--- a/do_blackBoxTest_func.php
+++ b/do_blackBoxTest_func.php
@@ -97,7 +97,7 @@ function do_blackBoxTest($mainFileNameWithExtension, $test, $fullWorkingDirPath,
     . ' "' . $maxErrLinesToRead . '"'                      # arg[11] max lines to read from the user program stderr (inclusive)
     . ' "' . $maxLinesToWrite . '"'                        # arg[12]  max lines to write to the user program (inclusive)
     . ' "' . $uniqueSessionId . '"'                        # arg[13] a unique session id
-    . ' "' . $showTestRunnerDebugOutput . '"'              # arg[14] showTestRunnerDebugOutput
+    . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"'              # arg[14] showTestRunnerDebugOutput
 
     ;
 
diff --git a/do_compileTest_func.php b/do_compileTest_func.php
index 62adc33..b1ade84 100644
--- a/do_compileTest_func.php
+++ b/do_compileTest_func.php
@@ -38,7 +38,7 @@ function do_compile($mainFileNameWithExtension, $fullWorkingDirPath, $compileCmd
         . ' "' . $compileCmd . '"'                              # arg[3] command to execute
         . ' "' . implode(',', $sourceFileExtensions) . '"'# arg[4] the source file extensions
         . ' "' . $uniqueSessionId . '"'                         # arg[5] a unique session id
-        . ' "' . $showTestRunnerDebugOutput . '"'              # arg[6] showTestRunnerDebugOutput
+        . ' "' . ($showTestRunnerDebugOutput === TRUE ? 1 : 0) . '"'              # arg[6] showTestRunnerDebugOutput
     ;
 
     exec($longCmd, $output, $return_var);
diff --git a/readme.md b/readme.md
index d68d2b7..c08f0df 100644
--- a/readme.md
+++ b/readme.md
@@ -368,7 +368,7 @@ A json object with the following properties (order does not matter)
   after the java executable (else the user program would be called with utf8 encoding but the test runner cannot handle UTF8)
   **also do not forget to correctly set the compile and exec commands in the PLang Table (add the -Dfile.encoding=UTF8 there too)!!!**
   
-* **showTestRunnerDebugOutput**: 0/1, 1: show some internal debug output from the test runner for debugging (sent back as a part of the test response) 
+* **showTestRunnerDebugOutput**: (int) 0/1, 1: show some internal debug output from the test runner for debugging (sent back as a part of the test response) 
 * **maxLinesToRead**: (int) the total (inclusive) number of lines to read from the user program (-x or 0 for unlimited)
 * **maxErrLinesToRead**: (int) the total (inclusive) number of lines to read from the user program error stream (stderr) (-x or 0 for unlimited)
 * **maxLinesToWrite**: (int) the total (inclusive) number of lines to write to the user program (-x or 0 for unlimited)
-- 
GitLab