mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2025-12-02 11:05:52 +00:00
add offset parameter in strings
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package dev.inmo.krontab.utils
|
||||
|
||||
import com.soywiz.klock.DateTimeTz
|
||||
import dev.inmo.krontab.buildSchedule
|
||||
import dev.inmo.krontab.internal.offsetRange
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.flow.takeWhile
|
||||
@@ -76,4 +78,16 @@ class StringParseTest {
|
||||
assertEquals(expectedCollects, collected)
|
||||
}
|
||||
}
|
||||
@Test
|
||||
fun testThatTimezoneCorrectlyDeserialized() {
|
||||
val now = DateTimeTz.nowLocal()
|
||||
|
||||
runTest {
|
||||
for (i in offsetRange) {
|
||||
val kronScheduler = buildSchedule("* * 10 * * ${i}o")
|
||||
val next = kronScheduler.next(now)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user