Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8406] ProcessBuilderImpl catches exceptions thrown on background thread
[8406] Adds more caught exceptions in Simple ProcessBuilder#run
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package scala.sys.process | ||
|
||
import org.junit.runner.RunWith | ||
import org.junit.runners.JUnit4 | ||
import org.junit.Test | ||
|
||
@RunWith(classOf[JUnit4]) | ||
class ProcessBuilderTest { | ||
|
||
@Test | ||
def t8406: Unit = { | ||
import java.io.ByteArrayInputStream | ||
import scala.util.Try | ||
assert(Try(("does-not-exist" #< new ByteArrayInputStream("foo".getBytes("utf-8"))).lazyLines).isSuccess) | ||
assert(Try(("does-not-exist" #< new ByteArrayInputStream("foo".getBytes("utf-8"))).lazyLines.toList).isFailure) | ||
} | ||
} |