Merge lp:~ted/ubuntu-app-launch/chatter-test into lp:ubuntu-app-launch/16.04

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 221
Merged at revision: 218
Proposed branch: lp:~ted/ubuntu-app-launch/chatter-test
Merge into: lp:ubuntu-app-launch/16.04
Diff against target: 56 lines (+20/-1)
4 files modified
libubuntu-app-launch/application.cpp (+1/-1)
tests/click-app-dir/.click/info/chatter.robert-ancell.manifest (+8/-0)
tests/click-app-dir/chatter.desktop (+9/-0)
tests/libual-cpp-test.cc (+2/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/chatter-test
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+293126@code.launchpad.net

Commit message

Adjust version regular expression to handle single character version numbers

Description of the change

mterry found an app that breaks thing, so we added the test and a fix.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntu-app-launch/application.cpp'
2--- libubuntu-app-launch/application.cpp 2016-03-03 20:40:00 +0000
3+++ libubuntu-app-launch/application.cpp 2016-04-27 14:23:52 +0000
4@@ -79,7 +79,7 @@
5 on Jan 16, 2016 revision 566 */
6 #define REGEX_PKGNAME "([a-z0-9][a-z0-9+.-]+)"
7 #define REGEX_APPNAME "([A-Za-z0-9+-.:~-]+)"
8-#define REGEX_VERSION "([\\d+:]?[A-Za-z0-9.+:~-]+?[-[A-Za-z0-9+.~]+]?)"
9+#define REGEX_VERSION "([\\d+:]?[A-Za-z0-9.+:~-]+?(?:-[A-Za-z0-9+.~]+)?)"
10
11 const std::regex full_appid_regex("^" REGEX_PKGNAME "_" REGEX_APPNAME "_" REGEX_VERSION "$");
12 const std::regex short_appid_regex("^" REGEX_PKGNAME "_" REGEX_APPNAME "$");
13
14=== added file 'tests/click-app-dir/.click/info/chatter.robert-ancell.manifest'
15--- tests/click-app-dir/.click/info/chatter.robert-ancell.manifest 1970-01-01 00:00:00 +0000
16+++ tests/click-app-dir/.click/info/chatter.robert-ancell.manifest 2016-04-27 14:23:52 +0000
17@@ -0,0 +1,8 @@
18+{
19+ "version": "2",
20+ "hooks": {
21+ "application": {
22+ "desktop": "chatter.desktop"
23+ }
24+ }
25+}
26
27=== added file 'tests/click-app-dir/chatter.desktop'
28--- tests/click-app-dir/chatter.desktop 1970-01-01 00:00:00 +0000
29+++ tests/click-app-dir/chatter.desktop 2016-04-27 14:23:52 +0000
30@@ -0,0 +1,9 @@
31+[Desktop Entry]
32+Name=Chatter
33+Comment=Chat on Internet Relay Chat (IRC) networks
34+Keywords=irc,online,chat,freenode
35+Exec=chatter
36+Icon=chatter.png
37+Terminal=false
38+Type=Application
39+X-Ubuntu-Touch=true
40
41=== added symlink 'tests/click-root-dir/.click/users/test-user/chatter.robert-ancell'
42=== target is u'../../../chatter.robert-ancell/2/'
43=== added directory 'tests/click-root-dir/chatter.robert-ancell'
44=== added symlink 'tests/click-root-dir/chatter.robert-ancell/2'
45=== target is u'../../click-app-dir/'
46=== modified file 'tests/libual-cpp-test.cc'
47--- tests/libual-cpp-test.cc 2016-02-17 21:56:34 +0000
48+++ tests/libual-cpp-test.cc 2016-04-27 14:23:52 +0000
49@@ -559,6 +559,8 @@
50 {
51 EXPECT_FALSE(ubuntu::app_launch::AppID::parse("com.ubuntu.test_test_123").empty());
52 EXPECT_FALSE(ubuntu::app_launch::AppID::find("inkscape").empty());
53+ EXPECT_FALSE(ubuntu::app_launch::AppID::parse("chatter.robert-ancell_chatter_2").empty());
54+ EXPECT_FALSE(ubuntu::app_launch::AppID::find("chatter.robert-ancell_chatter").empty());
55
56 auto id = ubuntu::app_launch::AppID::parse("com.ubuntu.test_test_123");
57

Subscribers

People subscribed via source and target branches