File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
src/test/kotlin/kscript/test Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ dependencies {
27
27
// compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
28
28
compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
29
29
30
- testRuntime ' junit:junit:4.11'
31
- testRuntime " io.kotlintest:kotlintest:1.3.2 "
30
+ testCompile ' junit:junit:4.11'
31
+ testCompile " io.kotlintest:kotlintest:2.0.1 "
32
32
}
33
33
34
34
Original file line number Diff line number Diff line change 1
1
package kscript.test
2
2
3
- import io.kotlintest.specs.FlatSpec
3
+ import io.kotlintest.matchers.shouldBe
4
+ import io.kotlintest.specs.StringSpec
4
5
import kscript.print
5
6
import kscript.stdin
6
7
7
8
/* *
8
9
* @author Holger Brandl
9
10
*/
10
- class SupportApiTest : FlatSpec () { init {
11
+ class SupportApiTest : StringSpec () { init {
11
12
12
- " it" should " allow to use stdin for filtering and mapping" {
13
- val longDf = stdin.filter { " ^de0[-0]*" .toRegex().matches(it) }.map { it + " foo:" }.print ()
13
+ " length should return size of string" {
14
+ " hello" .length shouldBe 5
15
+ }
16
+
17
+ " allow to use stdin for filtering and mapping" {
18
+ stdin.filter { " ^de0[-0]*" .toRegex().matches(it) }.map { it + " foo:" }.print ()
14
19
}
15
20
}
16
21
}
You can’t perform that action at this time.
0 commit comments