[Bug 29259] New: [QT3TS] subarray() errorcode for test d1e76078

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29259

            Bug ID: 29259
           Summary: [QT3TS] subarray() errorcode for test d1e76078
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: debbie@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

The expected error code for the test d1e76078 in test set app-Walmsley has been
modified. The test is:
declare variable $array1 := ["abc","def","ghi","jkl"];
 array:subarray($array1,6)

And now expects FOAY0001, rather than FOAY0002. From a strict reading of the
spec, I disagree with the change. 

The spec currently says "raise [err:FOAY0001] if $start is less than one"; but
it does not say raise this error if $start is greater than array:size($array)
(perhaps this is a spec bug??). It says "The two-argument version of the
function returns the same result (or the same error) as the three-argument
version when called with $length equal to the value of array:size($array) -
$start + 1." So in this case, $length is calculated to be -1, and then we get
"raise [err:FOAY0002] if $length is less than zero."

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 3 November 2015 18:37:39 UTC