mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Reduce not expressions
Fixes queries containing macros inside a "not".
This commit is contained in:
@ -43,4 +43,11 @@ class ItemQueryGeneratorTest extends FunSuite {
|
||||
assertEquals(cond, expect)
|
||||
}
|
||||
|
||||
test("!conc:*") {
|
||||
val q = ItemQueryParser.parseUnsafe("!conc:*")
|
||||
val cond = ItemQueryGenerator(now, tables, Ident.unsafe("coll"))(q)
|
||||
val expect = not(tables.concPers.name.like("%") || tables.concEquip.name.like("%"))
|
||||
assertEquals(cond, expect)
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user