summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Baker <brbaker@adobe.com>2013-06-07 07:05:37 -0400
committerBrent Baker <brbaker@adobe.com>2013-06-07 07:05:37 -0400
commitc57927b71c6e140f3ebc5bf3358855776c5db119 (patch)
tree388664d8c787f8ad717336ebf6f3e2e3798f9ead
parenta0ff8451d99e8034998418c123e19e977c976a50 (diff)
downloadtest262-c57927b71c6e140f3ebc5bf3358855776c5db119.tar.gz
Bug 1548: Update results handling for Annex B section (r+bterlson)
-rw-r--r--console/harness/helper.js7
-rw-r--r--test/harness/helper.js7
-rw-r--r--website/harness/helper.js7
-rw-r--r--website/metadata/ecma-262-toc.xml14
4 files changed, 29 insertions, 6 deletions
diff --git a/console/harness/helper.js b/console/harness/helper.js
index 04c6cb6b7..982400def 100644
--- a/console/harness/helper.js
+++ b/console/harness/helper.js
@@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
- var match = id.match(/\d+/g);
+ var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
+ if (match === null)
+ return section;
+
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
- parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
+ parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}
diff --git a/test/harness/helper.js b/test/harness/helper.js
index 04c6cb6b7..982400def 100644
--- a/test/harness/helper.js
+++ b/test/harness/helper.js
@@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
- var match = id.match(/\d+/g);
+ var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
+ if (match === null)
+ return section;
+
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
- parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
+ parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}
diff --git a/website/harness/helper.js b/website/harness/helper.js
index 04c6cb6b7..982400def 100644
--- a/website/harness/helper.js
+++ b/website/harness/helper.js
@@ -259,9 +259,12 @@ function Presenter() {
if(id == 0)
return globalSection;
- var match = id.match(/\d+/g);
+ var match = id.match(/\d+|[A-F](?=\.)/g);
var section = globalSection;
+ if (match === null)
+ return section;
+
for(var i = 0; i < match.length; i++) {
if(typeof section.subsections[match[i]] !== "undefined") {
section = section.subsections[match[i]];
@@ -358,7 +361,7 @@ function Presenter() {
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName === "sec") {
subsection = new Section(parentSection, nodes[i].getAttribute('id'), nodes[i].getAttribute('name'));
- parentSection.subsections[subsection.id.match(/\d+$/)] = subsection;
+ parentSection.subsections[subsection.id.match(/\d+$|[A-F]$/)] = subsection;
addSectionsFromXML(nodes[i].childNodes, subsection);
}
}
diff --git a/website/metadata/ecma-262-toc.xml b/website/metadata/ecma-262-toc.xml
index 72c567eaf..bd9e99067 100644
--- a/website/metadata/ecma-262-toc.xml
+++ b/website/metadata/ecma-262-toc.xml
@@ -303,4 +303,18 @@
<sec id="15.12.3" name="stringify ( value [ , replacer [ , space ] ] )"/>
</sec>
</sec>
+ <sec id="B" name="Annex B (informative) Compatibility">
+ <sec id="B.1" name="Additional Syntax">
+ <sec id="B.1.1" name="Numeric Literals"/>
+ <sec id="B.1.2" name="String Literals"/>
+ </sec>
+ <sec id="B.2" name="Additional Properties">
+ <sec id="B.2.1" name="escape"/>
+ <sec id="B.2.2" name="unescape"/>
+ <sec id="B.2.3" name="String.prototype.substr"/>
+ <sec id="B.2.4" name="Date.prototype.getYear"/>
+ <sec id="B.2.5" name="Date.prototype.setYear"/>
+ <sec id="B.2.6" name="Date.prototype.toGMTString"/>
+ </sec>
+ </sec>
</esSpec> \ No newline at end of file