#BUGFIX by stefan
class: RegressionTests::OperatingSystemTest
#testInvalidCommand
https://expeccoalm.exept.de/D207480
#couldNotExecute does not work in Windows
--- 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).
].
"