Explorar o código

fix off-by-one bug in pattern matching

[SVN r28943]
Aleksey Gurtovoy %!s(int64=21) %!d(string=hai) anos
pai
achega
ddfac55ea8
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      tools/regression/xsl_reports/xsl/test/test_re_match.xsl

+ 2 - 2
tools/regression/xsl_reports/xsl/test/test_re_match.xsl

@@ -50,8 +50,8 @@ http://www.boost.org/LICENSE_1_0.txt)
     </func:function>
 
     <xsl:template match='test'>
-        <xsl:variable name="result" select="meta:re_match( @pattern, @text ) = 'true'"/>
-        <xsl:variable name="expected-result" select="@result"/>
+        <xsl:variable name="result" select="meta:re_match( @pattern, @text )"/>
+        <xsl:variable name="expected-result" select="@result = 'true'"/>
         <xsl:if test="$result != $expected-result">
             <failed regex="{@pattern}" text="{@text}" result="{$result}"  expected-result="{$expected-result}"/>
         </xsl:if>

粤ICP备19079148号