Merge lp:~paul-lucas/zorba/bug-1188084 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11502
Merged at revision: 11502
Proposed branch: lp:~paul-lucas/zorba/bug-1188084
Merge into: lp:zorba
Diff against target: 71 lines (+18/-7)
4 files modified
ChangeLog (+1/-0)
src/runtime/strings/strings_impl.cpp (+14/-3)
src/util/icu_regex.cpp (+3/-3)
test/fots/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-1188084
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+168556@code.launchpad.net

Commit message

Fixed fn:replace() replacement string that has > 9 $ substitutions.

Description of the change

Fixed fn:replace() replacement string that has > 9 $ substitutions.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-1188084 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job bug-1188084-2013-06-10T22-52-48.58Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-1188084-2013-06-10T23-25-47.934Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

lp:~paul-lucas/zorba/bug-1188084 updated
11502. By Paul J. Lucas

Updated ChangeLog.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-1188084-2013-06-11T15-22-53.109Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-06-08 05:33:57 +0000
3+++ ChangeLog 2013-06-11 00:17:26 +0000
4@@ -16,6 +16,7 @@
5
6 Bug Fixes/Other Changes:
7 * Fixed bug #1117952 (Improve XML error output format)
8+ * Fixed bug #1188084 (fn-replace-42 failing)
9 * Fixed bug in hoisting through try-catch expr
10 * Fixed bug #1162631 (format-integer 'w' format of negative numbers)
11 * Fixed bug #1103115 (Timezone units as hours are wrong)
12
13=== modified file 'src/runtime/strings/strings_impl.cpp'
14--- src/runtime/strings/strings_impl.cpp 2013-06-06 18:33:17 +0000
15+++ src/runtime/strings/strings_impl.cpp 2013-06-11 00:17:26 +0000
16@@ -1609,10 +1609,21 @@
17 ERROR_PARAMS( replacement, ZED( BadCharAfter_34 ), *c, '$' ),
18 ERROR_LOC( loc )
19 );
20- if ( *c - '0' <= num_capturing_groups ) {
21- temp_replacement += '$';
22- temp_replacement += *c;
23+
24+ int group = *c - '0';
25+ char const c2 = ztd::peek( replacement, c );
26+ if ( ascii::is_digit( c2 ) )
27+ group = group * 10 + c2 - '0';
28+
29+ if ( group <= num_capturing_groups ) {
30+ temp_replacement += '$';
31+ temp_replacement += *c;
32+ } else if ( num_capturing_groups && group > 9 ) {
33+ temp_replacement += '$';
34+ temp_replacement += *c;
35+ temp_replacement += '\\';
36 }
37+
38 got_dollar = false;
39 continue;
40 }
41
42=== modified file 'src/util/icu_regex.cpp'
43--- src/util/icu_regex.cpp 2013-04-19 04:07:25 +0000
44+++ src/util/icu_regex.cpp 2013-06-11 00:17:26 +0000
45@@ -616,11 +616,11 @@
46 return;
47
48 not_single_char_esc:
49- throw INVALID_RE_EXCEPTION( xq_re, ZED( NotSingleCharEsc_3 ), c );
50+ throw INVALID_RE_EXCEPTION( xq_re, ZED( NotSingleCharEsc_3 ), c );
51 unbalanced_char:
52- throw INVALID_RE_EXCEPTION( xq_re, ZED( UnbalancedChar_3 ), c );
53+ throw INVALID_RE_EXCEPTION( xq_re, ZED( UnbalancedChar_3 ), c );
54 unescaped_char:
55- throw INVALID_RE_EXCEPTION( xq_re, ZED( UnescapedChar_3 ), c );
56+ throw INVALID_RE_EXCEPTION( xq_re, ZED( UnescapedChar_3 ), c );
57 }
58
59 ///////////////////////////////////////////////////////////////////////////////
60
61=== modified file 'test/fots/CMakeLists.txt'
62--- test/fots/CMakeLists.txt 2013-06-07 09:10:30 +0000
63+++ test/fots/CMakeLists.txt 2013-06-11 00:17:26 +0000
64@@ -193,7 +193,6 @@
65 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-016 1188269)
66 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-017 1188269)
67 EXPECTED_FOTS_FAILURE (fn-parse-xml-fragment parse-xml-fragment-020 1188269)
68-EXPECTED_FOTS_FAILURE (fn-replace fn-replace-42 1188084)
69 EXPECTED_FOTS_FAILURE (fn-resolve-uri fn-resolve-uri-26 1188088)
70 EXPECTED_FOTS_FAILURE (fn-resolve-uri fn-resolve-uri-28 1188088)
71 EXPECTED_FOTS_FAILURE (fn-serialize serialize-xml-007a 1188122)

Subscribers

People subscribed via source and target branches