aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json')
-rw-r--r--website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json14
1 files changed, 14 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json b/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json
new file mode 100644
index 000000000..408766e29
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.10.2_Pattern_Semantics",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.10.2",
+ "description": "See bug http://bugzilla.mozilla.org/show_bug.cgi?id=103087",
+ "test": "// REX/Javascript 1.0 \n// Robert D. Cameron \"REX: XML Shallow Parsing with Regular Expressions\",\n// Technical Report TR 1998-17, School of Computing Science, Simon Fraser \n// University, November, 1998.\n// Copyright (c) 1998, Robert D. Cameron. \n// The following code may be freely used and distributed provided that\n// this copyright and citation notice remains intact and that modifications\n// or additions are clearly identified.\n\nTextSE = \"[^<]+\";\nUntilHyphen = \"[^-]*-\";\nUntil2Hyphens = UntilHyphen + \"([^-]\" + UntilHyphen + \")*-\";\nCommentCE = Until2Hyphens + \">?\";\nUntilRSBs = \"[^]]*]([^]]+])*]+\";\nCDATA_CE = UntilRSBs + \"([^]>]\" + UntilRSBs + \")*>\";\nS = \"[ \\\\n\\\\t\\\\r]+\";\nNameStrt = \"[A-Za-z_:]|[^\\\\x00-\\\\x7F]\";\nNameChar = \"[A-Za-z0-9_:.-]|[^\\\\x00-\\\\x7F]\";\nName = \"(\" + NameStrt + \")(\" + NameChar + \")*\";\nQuoteSE = '\"[^\"]' + \"*\" + '\"' + \"|'[^']*'\";\nDT_IdentSE = S + Name + \"(\" + S + \"(\" + Name + \"|\" + QuoteSE + \"))*\";\nMarkupDeclCE = \"([^]\\\"'><]+|\" + QuoteSE + \")*>\";\nS1 = \"[\\\\n\\\\r\\\\t ]\";\nUntilQMs = \"[^?]*\\\\?+\";\nPI_Tail = \"\\\\?>|\" + S1 + UntilQMs + \"([^>?]\" + UntilQMs + \")*>\";\nDT_ItemSE = \"<(!(--\" + Until2Hyphens + \">|[^-]\" + MarkupDeclCE + \")|\\\\?\" + Name + \"(\" + PI_Tail + \"))|%\" + Name + \";|\" + S;\nDocTypeCE = DT_IdentSE + \"(\" + S + \")?(\\\\[(\" + DT_ItemSE + \")*](\" + S + \")?)?>?\";\nDeclCE = \"--(\" + CommentCE + \")?|\\\\[CDATA\\\\[(\" + CDATA_CE + \")?|DOCTYPE(\" + DocTypeCE + \")?\";\nPI_CE = Name + \"(\" + PI_Tail + \")?\";\nEndTagCE = Name + \"(\" + S + \")?>?\";\nAttValSE = '\"[^<\"]' + \"*\" + '\"' + \"|'[^<']*'\";\nElemTagCE = Name + \"(\" + S + Name + \"(\" + S + \")?=(\" + S + \")?(\" + AttValSE + \"))*(\" + S + \")?/?>?\";\nMarkupSPE = \"<(!(\" + DeclCE + \")?|\\\\?(\" + PI_CE + \")?|/(\" + EndTagCE + \")?|(\" + ElemTagCE + \")?)\";\nXML_SPE = TextSE + \"|\" + MarkupSPE;\n\n///\n////\n/////\n\n__patterns = [TextSE,UntilHyphen,Until2Hyphens,CommentCE,UntilRSBs,CDATA_CE,S,NameStrt, NameChar, \nName, QuoteSE, DT_IdentSE, MarkupDeclCE, S1,UntilQMs, PI_Tail, DT_ItemSE, DocTypeCE, DeclCE, \nPI_CE, EndTagCE, AttValSE, ElemTagCE, MarkupSPE, XML_SPE];\n\n__html=\"\"+\n'<html xmlns=\"http://www.w3.org/1999/xhtml\"\\n' +\n' xmlns:xlink=\"http://www.w3.org/XML/XLink/0.9\">\\n' +\n' <head><title>Three Namespaces</title></head>\\n' +\n' <body>\\n' +\n' <h1 align=\"center\">An Ellipse and a Rectangle</h1>\\n' +\n' <svg xmlns=\"http://www.w3.org/Graphics/SVG/SVG-19991203.dtd\"\\n' +\n' width=\"12cm\" height=\"10cm\">\\n' +\n' <ellipse rx=\"110\" ry=\"130\" />\\n' +\n' <rect x=\"4cm\" y=\"1cm\" width=\"3cm\" height=\"6cm\" />\\n' +\n' </svg>\\n' +\n' <p xlink:type=\"simple\" xlink:href=\"ellipses.html\">\\n' +\n' More about ellipses\\n' +\n' </p>\\n' +\n' <p xlink:type=\"simple\" xlink:href=\"rectangles.html\">\\n' +\n' More about rectangles\\n' +\n' </p>\\n' +\n' <hr/>\\n' +\n' <p>Last Modified February 13, 2000</p>\\n' +\n' </body>\\n' +\n'</html>';\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n for(var index=0; index<__patterns.length; index++) {\n \t__re = new RegExp(__patterns[index]);\n \t__re.test(__html);\n }\n} catch (e) {\n\t$ERROR('#'+index+\": XML Shallow Parsing with Regular Expression: \"+__patterns[index]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.10.2_A1_T1"
+ }
+ ]
+ }
+}