added arg test
This commit is contained in:
parent
be1acae414
commit
82ebf2d645
@ -24,7 +24,6 @@ import dorkbox.executor.samples.TestSetup
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Tests passing empty arguments.
|
||||
@ -34,6 +33,14 @@ import java.util.*
|
||||
* @see ArgumentsAsList
|
||||
*/
|
||||
class EmptyArgTest {
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testGetArgs() {
|
||||
val output = argumentsAsList("arg1", "", "arg3", "")
|
||||
|
||||
Assert.assertEquals(output.getArgs().size, 5) // because the java file is also one of the args.
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testReadOutputAndError() {
|
||||
@ -43,7 +50,7 @@ class EmptyArgTest {
|
||||
}
|
||||
|
||||
Assert.assertEquals("[arg1, , arg3, ]", output)
|
||||
println(output)
|
||||
// println(output)
|
||||
}
|
||||
|
||||
private fun argumentsAsList(vararg args: String): Executor {
|
||||
|
Loading…
Reference in New Issue
Block a user