test-client-custom-summary: Added various tests
authorTristan Van Berkom <tristanvb@openismus.com>
Sat, 23 Nov 2013 13:36:18 +0000 (22:36 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Fri, 29 Nov 2013 13:08:03 +0000 (22:08 +0900)
commitfd7322912a93a378eada9a210ac3afddf0776e8f
treee527f2d5dbe0ef03da14b79b8dc8be419225df94
parent19cec20eeb456aaae4dce52d8270d6f79e3c198b
test-client-custom-summary: Added various tests

  o Added test for the underscore

    Before we used to only escape the '%' character in LIKE statements,
    but SQLite also recognizes the '_' as a single char wildcard and
    needs escaping.

    This test ensures that the underscore is properly handled.

  o Added query test which ORs the same field

    This helps to test the query optimizer in EBookBackendSqlite, which
    will optimize a query which ORs two multi attribute fields (like
    E_CONTACT_EMAIL).

  o Added tests for the NOT queries

  o Added tests for NOT, AND and OR and as well as some nested AND / OR
    tests which trigger the query optimizer in EBookBackendSqlite

  o Fix expectations for phone number matches, now that the phone number
    comparisons are fixed

  o Added --filter option.

    Pass a regular expression to filter which test cases should run

  o Added test which searches by UID (can trigger bugs if normalization
    is mistakenly done on the UIDs).
tests/libebook/client/test-client-custom-summary.c
tests/libebook/data/vcards/custom-4.vcf
tests/libebook/data/vcards/custom-6.vcf