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 {
2727// compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
2828 compile " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
2929
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 "
3232}
3333
3434
Original file line number Diff line number Diff line change 11package kscript.test
22
3- import io.kotlintest.specs.FlatSpec
3+ import io.kotlintest.matchers.shouldBe
4+ import io.kotlintest.specs.StringSpec
45import kscript.print
56import kscript.stdin
67
78/* *
89 * @author Holger Brandl
910 */
10- class SupportApiTest : FlatSpec () { init {
11+ class SupportApiTest : StringSpec () { init {
1112
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 ()
1419 }
1520}
1621}
You can’t perform that action at this time.
0 commit comments