[evolution-data-server/sqlite-refactor: 12/13] test-client-custom-summary: Added test for the underscore
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/sqlite-refactor: 12/13] test-client-custom-summary: Added test for the underscore
- Date: Sun, 24 Nov 2013 13:25:37 +0000 (UTC)
commit a21e2b733aefad9a6fd6945f4439cc69a6080e0f
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Sat Nov 23 22:36:18 2013 +0900
test-client-custom-summary: 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.
tests/libebook/client/test-client-custom-summary.c | 13 +++++++++++++
tests/libebook/data/vcards/custom-6.vcf | 2 +-
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/tests/libebook/client/test-client-custom-summary.c
b/tests/libebook/client/test-client-custom-summary.c
index a6ab18a..f13d48c 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -407,6 +407,19 @@ main (gint argc,
suites[i].custom,
FALSE);
+ add_client_test (
+ suites[i].prefix,
+ "/Prefix/FullName/Underscore",
+ suites[i].func,
+ e_book_query_field_test (
+ E_CONTACT_FULL_NAME,
+ E_BOOK_QUERY_CONTAINS,
+ "ran_ge"),
+ 1,
+ suites[i].direct,
+ suites[i].custom,
+ FALSE);
+
/* Query the E_CONTACT_TEL field for something that is not a
* phone number, user is searching for all the contacts when
* they noted they must ask Jenny for the phone number. */
diff --git a/tests/libebook/data/vcards/custom-6.vcf b/tests/libebook/data/vcards/custom-6.vcf
index 03f7767..a43da5e 100644
--- a/tests/libebook/data/vcards/custom-6.vcf
+++ b/tests/libebook/data/vcards/custom-6.vcf
@@ -1,5 +1,5 @@
BEGIN:VCARD
UID:custom-6
TEL;HOME:ask Jenny for Lisa's number
-FN:%Strange Name
+FN:%Stran_ge Name
END:VCARD
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]