Merge lp:~veebers/xpathselect/fix_for_colons_in_node_name_1281688 into lp:xpathselect

Proposed by Christopher Lee
Status: Merged
Approved by: Thomi Richards
Approved revision: 45
Merged at revision: 42
Proposed branch: lp:~veebers/xpathselect/fix_for_colons_in_node_name_1281688
Merge into: lp:xpathselect
Diff against target: 33 lines (+5/-2)
2 files modified
lib/parser.h (+1/-1)
test/test_parser.cpp (+4/-1)
To merge this branch: bzr merge lp:~veebers/xpathselect/fix_for_colons_in_node_name_1281688
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+207289@code.launchpad.net

Commit message

Node names can now contain colons (so names like Internal::MainWindow work). Tests added.

Description of the change

Node names can now contain colons (so names like Internal::MainWindow work). Tests added.

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
Thomi Richards (thomir-deactivatedaccount) wrote :

LGTM, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/parser.h'
--- lib/parser.h 2013-09-03 03:28:14 +0000
+++ lib/parser.h 2014-02-19 19:43:57 +0000
@@ -134,7 +134,7 @@
134 // spec_node_name is a node name that has been explicitly specified.134 // spec_node_name is a node name that has been explicitly specified.
135 // it must start and end with a non-space character, but you can have135 // it must start and end with a non-space character, but you can have
136 // spaces in the middle.136 // spaces in the middle.
137 spec_node_name = +qi::char_("a-zA-Z0-9_\\-") >> *(+qi::char_(" ") >> +qi::char_("a-zA-Z0-9_\\-"));137 spec_node_name = +qi::char_("a-zA-Z0-9_\\-") >> *(+qi::char_(" :") >> +qi::char_("a-zA-Z0-9_\\-"));
138 // a wildcard node name is simply a '*'138 // a wildcard node name is simply a '*'
139 wildcard_node_name = qi::char_("*");139 wildcard_node_name = qi::char_("*");
140140
141141
=== modified file 'test/test_parser.cpp'
--- test/test_parser.cpp 2013-09-03 03:28:14 +0000
+++ test/test_parser.cpp 2014-02-19 19:43:57 +0000
@@ -327,6 +327,7 @@
327 std::pair<std::string, bool>("node-name", true),327 std::pair<std::string, bool>("node-name", true),
328 std::pair<std::string, bool>("node_name", true),328 std::pair<std::string, bool>("node_name", true),
329 std::pair<std::string, bool>("node\\name", true),329 std::pair<std::string, bool>("node\\name", true),
330 std::pair<std::string, bool>("node::name", false),
330 std::pair<std::string, bool>("node.name", false),331 std::pair<std::string, bool>("node.name", false),
331 std::pair<std::string, bool>("node name", false),332 std::pair<std::string, bool>("node name", false),
332 std::pair<std::string, bool>("..", false)333 std::pair<std::string, bool>("..", false)
@@ -458,7 +459,9 @@
458 std::pair<std::string, bool>("1", true),459 std::pair<std::string, bool>("1", true),
459 std::pair<std::string, bool>("node-name", true),460 std::pair<std::string, bool>("node-name", true),
460 std::pair<std::string, bool>("node_name", true),461 std::pair<std::string, bool>("node_name", true),
461 std::pair<std::string, bool>("node\\name", true)462 std::pair<std::string, bool>("node\\name", true),
463 std::pair<std::string, bool>("node::name", true),
464 std::pair<std::string, bool>("node::name::extra", true)
462 ));465 ));
463466
464467

Subscribers

People subscribed via source and target branches