Merge lp:~mhr3/unity-lens-applications/fix-1056743 into lp:unity-lens-applications

Proposed by Michal Hruby
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 311
Merged at revision: 309
Proposed branch: lp:~mhr3/unity-lens-applications/fix-1056743
Merge into: lp:unity-lens-applications
Diff against target: 73 lines (+33/-9)
3 files modified
configure.ac (+1/-1)
src/utils.vala (+6/-1)
tests/manual/apps-lens-tests.txt (+26/-7)
To merge this branch: bzr merge lp:~mhr3/unity-lens-applications/fix-1056743
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+127268@code.launchpad.net

Commit message

Improve Utils.preprocess_text

Description of the change

Ensure that the Utils.preprocess_text() method which prepares the string for indexing by xapian (by uncamelcasing and ascii folding) returns the original text as well.

Added manual test.

To post a comment you must log in.
311. By Michal Hruby

Update manual tests

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Nice one! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-09-26 08:54:43 +0000
3+++ configure.ac 2012-10-01 13:06:38 +0000
4@@ -64,7 +64,7 @@
5 gee-1.0
6 dee-1.0 >= 0.5.16
7 zeitgeist-1.0 >= 0.3.8
8- unity >= 6.5.1
9+ unity >= 6.7.0
10 libgnome-menu)
11
12 AC_SUBST(LENS_DAEMON_CFLAGS)
13
14=== modified file 'src/utils.vala'
15--- src/utils.vala 2012-02-15 14:48:10 +0000
16+++ src/utils.vala 2012-10-01 13:06:38 +0000
17@@ -86,10 +86,15 @@
18 }
19
20 var uncamelcased = uncamelcase (text);
21+ if (text != uncamelcased)
22+ {
23+ // make sure we don't discard the original completely
24+ uncamelcased = "%s\n%s".printf (text, uncamelcased);
25+ }
26 var folded = icu_filter.apply (uncamelcased);
27
28 if (uncamelcased == folded) return uncamelcased;
29-
30+
31 return "%s\n%s".printf (uncamelcased, folded);
32 }
33
34
35=== renamed file 'tests/manual/sort-order.txt' => 'tests/manual/apps-lens-tests.txt'
36--- tests/manual/sort-order.txt 2012-03-27 10:14:37 +0000
37+++ tests/manual/apps-lens-tests.txt 2012-10-01 13:06:38 +0000
38@@ -1,9 +1,28 @@
39-Sort order
40-==========
41+Application lens sort order
42+---------------------------
43 Tests that the sort order of the "Installed" category is alphabetical.
44
45-#. Open the Dash and switch to the application lens.
46-#. Make sure that the search string is empty.
47-
48-Outcome
49- The "Installed" category should be shown and the items within should be sorted alphabetically (respecting sorting of your locale).
50+Setup:
51+At least default ubuntu applications installed.
52+
53+Actions:
54+Open the Dash and switch to the application lens.
55+Make sure that the search string is empty.
56+
57+Expected Result:
58+The "Installed" category should be shown and the items within should be sorted alphabetically (respecting sorting of your locale).
59+
60+Search for applications with CamelCase names
61+--------------------------------------------
62+Searching for applications should work by searching for the whole name of a CamelCase application as well as with any part of the Camel name.
63+
64+Setup:
65+At least default ubuntu applications installed.
66+
67+Actions:
68+Open the Dash and switch to the application lens.
69+Search for an application with CamelCase name (for example "AisleRiot").
70+
71+Expected Result:
72+The search has to find the application when searching both "aisleriot" as well as "aisle" or "riot".
73+

Subscribers

People subscribed via source and target branches