blob: 6d1690b54eaa18c0a65ff5637f8616585664596f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package com.iinteractive.test
import java.io.ByteArrayOutputStream
import com.iinteractive.test.tap.Parser
class PlanTest extends TestMore {
private class PlanTestTest extends TestMore(2) {
is(1, 1)
is(2, 2)
}
val out = new ByteArrayOutputStream
val exitCode = Console.withOut(out) {
Console.withErr(out) {
(new PlanTestTest).run
}
}
is((new Parser).parse(out).exitCode, 0)
is(exitCode, 0)
val tap =
"1..2\n" +
"ok 1\n" +
"ok 2\n"
is(out.toString, tap)
}
|