MCPcopy
hub / github.com/perkeep/perkeep / TestQueryLogicalNot

Function TestQueryLogicalNot

pkg/search/query_test.go:369–390  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

367}
368
369func TestQueryLogicalNot(t *testing.T) {
370 testQuery(t, func(qt *queryTest) {
371 id := qt.id
372
373 // foo is sha224-0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
374 _, foo := id.UploadFile("file.txt", "foo", time.Unix(1382073153, 0))
375 // bar is sha224-07daf010de7f7f0d8d76a76eb8d1eb40182c8d1e7a3877a6686c9bf0
376 _, bar := id.UploadFile("file.txt", "bar", time.Unix(1382073153, 0))
377
378 sq := &SearchQuery{
379 Constraint: &Constraint{
380 Logical: &LogicalConstraint{
381 Op: "not",
382 A: &Constraint{
383 CamliType: "file",
384 },
385 },
386 },
387 }
388 qt.wantRes(sq, foo, bar)
389 })
390}
391
392func TestQueryPermanodeAttrExact(t *testing.T) {
393 testQuery(t, func(qt *queryTest) {

Callers

nothing calls this directly

Calls 3

testQueryFunction · 0.85
wantResMethod · 0.80
UploadFileMethod · 0.45

Tested by

no test coverage detected