Release 0.3.0-alpha.1 #164

Merged
Jef Roosens merged 78 commits from release-0.3.0-alpha.1 into main 2022-05-06 20:12:52 +02:00
8 changed files with 27 additions and 8 deletions
Showing only changes of commit f92a20fcf8 - Show all commits

15
.woodpecker/.test.yml Normal file
View file

@ -0,0 +1,15 @@
matrix:
PLATFORM:
- linux/amd64
- linux/arm64
platform: ${PLATFORM}
pipeline:
test:
image: 'chewingbever/vlang:latest'
pull: true
commands:
- make test
when:
event: push

View file

@ -27,6 +27,6 @@ pub fn cron(conf Config) ? {
// } // }
// println(queue) // println(queue)
exp := "10/2 5 *" exp := '10/2 5 *'
println(parse_expression(exp) ?) println(parse_expression(exp) ?)
} }

View file

@ -44,7 +44,7 @@ fn parse_expression(exp string) ?CronExpression {
parts := exp.split(' ') parts := exp.split(' ')
if parts.len != 3 { if parts.len != 3 {
return error("Expression must contain 5 space-separated parts.") return error('Expression must contain 5 space-separated parts.')
} }
return CronExpression{ return CronExpression{

View file

@ -1,5 +1,9 @@
module cron module cron
fn test_parse_star_range() { fn test_parse_star_range() ? {
assert parse_range('*', 0, 5) == [0, 1, 2, 3, 4, 5] assert parse_range('*', 0, 5) ? == [u32(0), 1, 2, 3, 4, 5]
}
fn test_parse_number() ? {
assert parse_range('4', 0, 5) ? == [u32(4)]
} }

View file