Migrate to the regex library away from std/nre, as the libpcre version that std/nre depends on is being deprecated in many distros.
This commit is contained in:
+29
-1
@@ -1 +1,29 @@
|
||||
doAssert(1 + 1 == 2)
|
||||
import std/[options, tables, times, unittest]
|
||||
|
||||
import pit/libpit
|
||||
|
||||
suite "regex-backed issue behavior":
|
||||
test "summary and full-text filters are case-insensitive":
|
||||
let issue = Issue(
|
||||
summary: "Fix the Widget",
|
||||
details: "Failure happens in the renderer",
|
||||
properties: newTable[string, string](),
|
||||
tags: @[])
|
||||
|
||||
check @[issue].filter(summaryMatchFilter("widget")).len == 1
|
||||
check @[issue].filter(summaryMatchFilter("missing")).len == 0
|
||||
check @[issue].filter(fullMatchFilter("RENDERER")).len == 1
|
||||
|
||||
test "recurrence values parse captures":
|
||||
let issue = Issue(
|
||||
summary: "repeating",
|
||||
properties: newTable[string, string](),
|
||||
tags: @[])
|
||||
|
||||
issue["recurrence"] = "after 2 weeks, abc123"
|
||||
|
||||
let recurrence = issue.getRecurrence()
|
||||
check recurrence.isSome
|
||||
check recurrence.get.isFromCompletion
|
||||
check recurrence.get.interval == weeks(2)
|
||||
check recurrence.get.cloneId == some("abc123")
|
||||
|
||||
Reference in New Issue
Block a user