#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Tue, 18 Jul 2017 12:19:50 +0200
changeset 1639 b52780155182
parent 1638 ba6a5298054c
child 1640 3b418a5df23b
#BUGFIX by stefan class: RegressionTests::OperatingSystemTest #testInvalidCommand https://expeccoalm.exept.de/D207480 #couldNotExecute does not work in Windows
RegressionTests__OperatingSystemTest.st
--- a/RegressionTests__OperatingSystemTest.st	Mon Jul 17 21:02:51 2017 +0200
+++ b/RegressionTests__OperatingSystemTest.st	Tue Jul 18 12:19:50 2017 +0200
@@ -167,19 +167,20 @@
 
     1 to:50 do:[:counter |
 "/ Transcript show:counter; showCR:':'.
-	outStr := '' writeStream.
-	errStr := '' writeStream.
-	OperatingSystem
-	    executeCommand:'blabla /fooBar'
-	    inputFrom:nil
-	    outputTo:outStr
-	    errorTo:errStr
-	    onError:[:status | exitStatus := status].
-	self assert:(exitStatus success not).
-	self assert:(exitStatus stillAlive not).
-	self assert:(exitStatus couldNotExecute).
-	self assert:(outStr contents isEmpty).
-	self assert:(errStr contents notEmpty).
+        outStr := '' writeStream.
+        errStr := '' writeStream.
+        OperatingSystem
+            executeCommand:'blabla /fooBar'
+            inputFrom:nil
+            outputTo:outStr
+            errorTo:errStr
+            onError:[:status | exitStatus := status].
+        self assert:(exitStatus success not).
+        self assert:(exitStatus stillAlive not).
+        "/ couldNotExecute could not be detected in Windows, since cmd.exe does not return the status
+        self assert:(OperatingSystem isMSWINDOWSlike or:[exitStatus couldNotExecute]).
+        self assert:(outStr contents isEmpty).
+        self assert:(errStr contents notEmpty).
     ].
 
     "