diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier')
69 files changed, 2428 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T1.js new file mode 100644 index 000000000..177d4cb6c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T1; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("the answer is 42") and check results; +*/ + +__executed = /\d{2,4}/.exec("the answer is 42"); + +__expected = ["42"]; +__expected.index = 14; +__expected.input = "the answer is 42"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("the answer is 42"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T10.js new file mode 100644 index 000000000..b79c945e2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T10.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T10; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /b{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); + +__expected = ["bbbbc"]; +__expected.index = 3; +__expected.input = "aaabbbbcccddeeeefffff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T11.js new file mode 100644 index 000000000..49c5543c9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T11.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T11; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /bx{0,93}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); + +__expected = ["bc"]; +__expected.index = 6; +__expected.input = "aaabbbbcccddeeeefffff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /bx{0,93}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T12.js new file mode 100644 index 000000000..9e4c23d14 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T12.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T12; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /.{0,93}/.exec("weirwerdf") and check results; +*/ + +__executed = /.{0,93}/.exec("weirwerdf"); + +__expected = ["weirwerdf"]; +__expected.index = 0; +__expected.input = "weirwerdf"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /.{0,93}/.exec("weirwerdf"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /.{0,93}/.exec("weirwerdf"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /.{0,93}/.exec("weirwerdf"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /.{0,93}/.exec("weirwerdf"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T2.js new file mode 100644 index 000000000..459790b39 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T2; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.test("the 7 movie") and check results; +*/ + +__executed = /\d{2,4}/.test("the 7 movie"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /\\d{2,4}/.test("the 7 movie") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T3.js new file mode 100644 index 000000000..d6653092f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T3; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("the 20000 Leagues Under the Sea book") and check results; +*/ + +__executed = /\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); + +__expected = ["2000"]; +__expected.index = 4; +__expected.input = "the 20000 Leagues Under the Sea book"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("the 20000 Leagues Under the Sea book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T4.js new file mode 100644 index 000000000..0c4b19c6e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T4; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("the Fahrenheit 451 book") and check results; +*/ + +__executed = /\d{2,4}/.exec("the Fahrenheit 451 book"); + +__expected = ["451"]; +__expected.index = 15; +__expected.input = "the Fahrenheit 451 book"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("the Fahrenheit 451 book"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T5.js new file mode 100644 index 000000000..25c3f88c3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T5.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T5; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("the 1984 novel") and check results; +*/ + +__executed = /\d{2,4}/.exec("the 1984 novel"); + +__expected = ["1984"]; +__expected.index = 4; +__expected.input = "the 1984 novel"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("the 1984 novel"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T6.js new file mode 100644 index 000000000..5cf5bb8f6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T6; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("0a0\u0031\u0031b") and check results; +*/ + +__executed = /\d{2,4}/.exec("0a0\u0031\u0031b"); + +__expected = ["011"]; +__expected.index = 2; +__expected.input = "0a011b"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u0031b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T7.js new file mode 100644 index 000000000..de50230e3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T7; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /\d{2,4}/.exec("0a0\u0031\u003122b") and check results; +*/ + +__executed = /\d{2,4}/.exec("0a0\u0031\u003122b"); + +__expected = ["0112"]; +__expected.index = 2; +__expected.input = "0a01122b"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{2,4}/.exec("0a0\\u0031\\u003122b"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T8.js new file mode 100644 index 000000000..7a8152111 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T8; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /b{2,3}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); + +__expected = ["bbbc"]; +__expected.index = 4; +__expected.input = "aaabbbbcccddeeeefffff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b{2,3}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T9.js new file mode 100644 index 000000000..582d599c5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A1_T9.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A1_T9; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , DecimalDigits } evaluates as ...; +* @description: Execute /b{42,93}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{42,93}c/.test("aaabbbbcccddeeeefffff"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /b{42,93}c/.test("aaabbbbcccddeeeefffff") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T1.js new file mode 100644 index 000000000..b1b71ac95 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T1.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A2_T1; +* @section: 15.10.2.7; +* @assertion: i) The production QuantifierPrefix :: { DecimalDigits } evaluates... +* ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /\w{3}\d?/.exec("CE\uFFFFL\uFFDDbox127") and check results; +*/ + +__executed = /\w{3}\d?/.exec("CE\uFFFFL\uFFDDbox127"); + +__expected = ["box1"]; +__expected.index = 5; +__expected.input = "CE\uFFFFL\uFFDDbox127"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\w{3}\\d?/.exec("CE\\uFFFFL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T2.js new file mode 100644 index 000000000..34b1a2c75 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A2_T2; +* @section: 15.10.2.7; +* @assertion: i) The production QuantifierPrefix :: { DecimalDigits } evaluates... +* ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /\w{3}\d?/.exec("CELL\uFFDDbox127") and check results; +*/ + +__executed = /\w{3}\d?/.exec("CELL\uFFDDbox127"); + +__expected = ["CEL"]; +__expected.index = 0; +__expected.input = "CELL\uFFDDbox127"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\w{3}\\d?/.exec("CELL\\uFFDDbox127"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T3.js new file mode 100644 index 000000000..f30de5267 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T3.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A2_T3; +* @section: 15.10.2.7; +* @assertion: i) The production QuantifierPrefix :: { DecimalDigits } evaluates... +* ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /b{2}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); + +__expected = ["bbc"]; +__expected.index = 5; +__expected.input = "aaabbbbcccddeeeefffff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b{2}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T4.js new file mode 100644 index 000000000..00c18fc16 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A2_T4.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A2_T4; +* @section: 15.10.2.7; +* @assertion: i) The production QuantifierPrefix :: { DecimalDigits } evaluates... +* ii) The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /b{8}c/.test("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{8}/.test("aaabbbbcccddeeeefffff"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /b{8}/.test("aaabbbbcccddeeeefffff") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T1.js new file mode 100644 index 000000000..3816efa8b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T1; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /\s+java\s+/.exec("language java\n") and check results; +*/ + +__executed = /\s+java\s+/.exec("language java\n"); + +__expected = [" java\n"]; +__expected.index = 8; +__expected.input = "language java\n"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\s+java\\s+/.exec("language java\\n"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T10.js new file mode 100644 index 000000000..eee578944 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T10.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T10; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /o+/.test("abcdefg") and check results; +*/ + +__executed = /o+/.test("abcdefg"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /o+/.test("abcdefg") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T11.js new file mode 100644 index 000000000..9f51c59a0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T11.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T11; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /d+/.exec("abcdefg") and check results; +*/ + +__executed = /d+/.exec("abcdefg"); + +__expected = ["d"]; +__expected.index = 3; +__expected.input = "abcdefg"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /d+/.exec("abcdefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /d+/.exec("abcdefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /d+/.exec("abcdefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /d+/.exec("abcdefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T12.js new file mode 100644 index 000000000..4fa113c4c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T12.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T12; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /(b+)(b+)(b+)/.exec("abbbbbbbc") and check results; +*/ + +__executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); + +__expected = ["bbbbbbb","bbbbb","b","b"]; +__expected.index = 1; +__expected.input = "abbbbbbbc"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(b+)(b+)(b+)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T13.js new file mode 100644 index 000000000..c186b929c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T13.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T13; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /(b+)(b*)/.exec("abbbbbbbc") and check results; +*/ + +__executed = /(b+)(b*)/.exec("abbbbbbbc"); + +__expected = ["bbbbbbb","bbbbbbb",""]; +__expected.index = 1; +__expected.input = "abbbbbbbc"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(b+)(b*)/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T14.js new file mode 100644 index 000000000..e35d07cb8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T14.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T14; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /b*b+/.exec("abbbbbbbc") and check results; +*/ + +__executed = /b*b+/.exec("abbbbbbbc"); + +__expected = ["bbbbbbb"]; +__expected.index = 1; +__expected.input = "abbbbbbbc"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b*b+/.exec("abbbbbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b*b+/.exec("abbbbbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b*b+/.exec("abbbbbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b*b+/.exec("abbbbbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T2.js new file mode 100644 index 000000000..0ee2fc785 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T2.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T2; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /\s+java\s+/.exec("\t java object") and check results; +*/ + +__executed = /\s+java\s+/.exec("\t java object"); + +__expected = ["\t java "]; +__expected.index = 0; +__expected.input = "\t java object"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\s+java\\s+/.exec("\\t java object"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T3.js new file mode 100644 index 000000000..eaf49a334 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T3.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T3; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /\s+java\s+/.test("\t javax package") and check results; +*/ + +__executed = /\s+java\s+/.test("\t javax package"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /\\s+java\\s+/.test("\\t javax package") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T4.js new file mode 100644 index 000000000..3e34b9a3a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T4.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T4; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /\s+java\s+/.test("java\n\nobject") and check results; +*/ + +__executed = /\s+java\s+/.test("java\n\nobject"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /\\s+java\\s+/.test("java\\n\\nobject") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T5.js new file mode 100644 index 000000000..bec3470dc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T5.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T5; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /[a-z]+\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and check results; +*/ + +__executed = /[a-z]+\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); + +__expected = ["x2"]; +__expected.index = 10; +__expected.input = "x 2 ff 55 x2 as1 z12 abc12.0"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[a-z]+\\d+/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T6.js new file mode 100644 index 000000000..74f49fd22 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T6; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /[a-z]+\d+/.exec("__abc123.0") and check results; +*/ + +__executed = /[a-z]+\d+/.exec("__abc123.0"); + +__expected = ["abc123"]; +__expected.index = 2; +__expected.input = "__abc123.0"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[a-z]+\\d+/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T7.js new file mode 100644 index 000000000..37700a892 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T7; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /[a-z]+(\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0") and check results; +*/ + +__executed = /[a-z]+(\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); + +__expected = ["x2","2"]; +__expected.index = 10; +__expected.input = "x 2 ff 55 x2 as1 z12 abc12.0"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[a-z]+(\\d+)/.exec("x 2 ff 55 x2 as1 z12 abc12.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T8.js new file mode 100644 index 000000000..aca3003b1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T8; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /[a-z]+(\d+)/.exec("__abc123.0") and check results; +*/ + +__executed = /[a-z]+(\d+)/.exec("__abc123.0"); + +__expected = ["abc123","123"]; +__expected.index = 2; +__expected.input = "__abc123.0"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[a-z]+(\\d+)/.exec("__abc123.0"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T9.js new file mode 100644 index 000000000..d74018ea9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A3_T9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A3_T9; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: + evaluates by returning the two results 1 and \infty; +* @description: Execute /d+/.exec("abcdddddefg") and check results; +*/ + +__executed = /d+/.exec("abcdddddefg"); + +__expected = ["ddddd"]; +__expected.index = 3; +__expected.input = "abcdddddefg"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /d+/.exec("abcdddddefg"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /d+/.exec("abcdddddefg"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /d+/.exec("abcdddddefg"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /d+/.exec("abcdddddefg"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T1.js new file mode 100644 index 000000000..38d39f5d8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T1; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[^"]* /.exec('"beast"-nickname') and check results; +*/ + +__executed = /[^"]*/.exec('"beast"-nickname'); + +__expected = [""]; +__expected.index = 0; +__expected.input = '"beast"-nickname'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[^"]*/.exec(\'"beast"-nickname\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T10.js new file mode 100644 index 000000000..c3caeb3e5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T10.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T10; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /d* /.exec('abcddddefg') and check results; +*/ + +__executed = /d*/.exec('abcddddefg'); + +__expected = [""]; +__expected.index = 0; +__expected.input = 'abcddddefg'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /d*/.exec(\'abcddddefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /d*/.exec(\'abcddddefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /d*/.exec(\'abcddddefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /d*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T11.js new file mode 100644 index 000000000..15179ce34 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T11.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T11; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /cd* /.exec('abcddddefg') and check results; +*/ + +__executed = /cd*/.exec('abcddddefg'); + +__expected = ["cdddd"]; +__expected.index = 2; +__expected.input = 'abcddddefg'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /cd*/.exec(\'abcddddefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /cd*/.exec(\'abcddddefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /cd*/.exec(\'abcddddefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /cd*/.exec(\'abcddddefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T12.js new file mode 100644 index 000000000..e49b5c1d9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T12.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T12; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /cx*d/.exec('abcdefg') and check results; +*/ + +__executed = /cx*d/.exec('abcdefg'); + +__expected = ["cd"]; +__expected.index = 2; +__expected.input = 'abcdefg'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /cx*d/.exec(\'abcdefg\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /cx*d/.exec(\'abcdefg\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /cx*d/.exec(\'abcdefg\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /cx*d/.exec(\'abcdefg\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T13.js new file mode 100644 index 000000000..351af1c02 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T13.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T13; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /(x*)(x+)/.exec('xxxxxxx') and check results; +*/ + +__executed = /(x*)(x+)/.exec('xxxxxxx'); + +__expected = ["xxxxxxx","xxxxxx","x"]; +__expected.index = 0; +__expected.input = 'xxxxxxx'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(x*)(x+)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T14.js new file mode 100644 index 000000000..1fac163e7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T14.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T14; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /(\d*)(\d+)/.exec('1234567890') and check results; +*/ + +__executed = /(\d*)(\d+)/.exec('1234567890'); + +__expected = ["1234567890","123456789","0"]; +__expected.index = 0; +__expected.input = '1234567890'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(\\d*)(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T15.js new file mode 100644 index 000000000..e620aca09 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T15.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T15; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /(\d*)\d(\d+)/.exec('1234567890') and check results; +*/ + +__executed = /(\d*)\d(\d+)/.exec('1234567890'); + +__expected = ["1234567890","12345678","0"]; +__expected.index = 0; +__expected.input = '1234567890'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(\\d*)\\d(\\d+)/.exec(\'1234567890\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T16.js new file mode 100644 index 000000000..650d73cfc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T16.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T16; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /(x+)(x*)/.exec('xxxxxxx') and check results; +*/ + +__executed = /(x+)(x*)/.exec('xxxxxxx'); + +__expected = ["xxxxxxx","xxxxxxx",""]; +__expected.index = 0; +__expected.input = 'xxxxxxx'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(x+)(x*)/.exec(\'xxxxxxx\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T17.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T17.js new file mode 100644 index 000000000..d0f5d6e62 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T17.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T17; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /x*y+$/.exec('xxxxxxyyyyyy') and check results; +*/ + +__executed = /x*y+$/.exec('xxxxxxyyyyyy'); + +__expected = ["xxxxxxyyyyyy"]; +__expected.index = 0; +__expected.input = 'xxxxxxyyyyyy'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /x*y+$/.exec(\'xxxxxxyyyyyy\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T18.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T18.js new file mode 100644 index 000000000..42f905bce --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T18.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T18; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[\d]*[\s]*bc./.exec('abcdef') and check results; +*/ + +__executed = /[\d]*[\s]*bc./.exec('abcdef'); + +__expected = ["bcd"]; +__expected.index = 1; +__expected.input = 'abcdef'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[\\d]*[\\s]*bc./.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T19.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T19.js new file mode 100644 index 000000000..19aedcfe2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T19.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T19; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /bc..[\d]*[\s]* /.exec('abcdef') and check results; +*/ + +__executed = /bc..[\d]*[\s]*/.exec('abcdef'); + +__expected = ["bcde"]; +__expected.index = 1; +__expected.input = 'abcdef'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /bc..[\\d]*[\\s]*/.exec(\'abcdef\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T2.js new file mode 100644 index 000000000..45624e194 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T2.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T2; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[^"]* /.exec('alice said: "don\'t"') and check results; +*/ + +__executed = /[^"]*/.exec('alice said: "don\'t"'); + +__expected = ["alice said: "]; +__expected.index = 0; +__expected.input = 'alice said: "don\'t"'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[^"]*/.exec(\'alice said: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T20.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T20.js new file mode 100644 index 000000000..7fc8b7253 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T20.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T20; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /.* /.exec('a1b2c3') and check results; +*/ + +__executed = /.*/.exec('a1b2c3'); + +__expected = ["a1b2c3"]; +__expected.index = 0; +__expected.input = 'a1b2c3'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /.*/.exec(\'a1b2c3\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /.*/.exec(\'a1b2c3\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /.*/.exec(\'a1b2c3\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /.*/.exec(\'a1b2c3\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T21.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T21.js new file mode 100644 index 000000000..034896a1f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T21.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T21; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[xyz]*1/.test('a0.b2.c3') and check results; +*/ + +__executed = /[xyz]*1/.test('a0.b2.c3'); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /[xyz]*1/.test(\'a0.b2.c3\') === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T3.js new file mode 100644 index 000000000..471db3ec6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T3; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[^"]* /.exec("before\'i\'start") and check results; +*/ + +__executed = /[^"]*/.exec("before\'i\'start"); + +__expected = ["before\'i\'start"]; +__expected.index = 0; +__expected.input = "before\'i\'start"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[^"]*/.exec("before\'i\'start"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[^"]*/.exec("before\'i\'start"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[^"]*/.exec("before\'i\'start"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[^"]*/.exec("before\'i\'start"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T4.js new file mode 100644 index 000000000..6a698d8d0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T4; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[^"]* /.exec('alice \"sweep\": "don\'t"') and check results; +*/ + +__executed = /[^"]*/.exec('alice \"sweep\": "don\'t"'); + +__expected = ["alice "]; +__expected.index = 0; +__expected.input = 'alice \"sweep\": "don\'t"'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[^"]*/.exec(\'alice \\"sweep\\": "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T5.js new file mode 100644 index 000000000..96551fe5c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T5.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T5; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /[^"]* /.exec('alice \u0022sweep\u0022: "don\'t"') and check results; +*/ + +__executed = /[^"]*/.exec('alice \u0022sweep\u0022: "don\'t"'); + +__expected = ["alice "]; +__expected.index = 0; +__expected.input = 'alice "sweep": "don\'t"'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /[^"]*/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T6.js new file mode 100644 index 000000000..8cc4bec68 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T6; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /["'][^"']*["']/.exec('alice \u0022sweep\u0022: "don\'t"') and check results; +*/ + +__executed = /["'][^"']*["']/.exec('alice \u0022sweep\u0022: "don\'t"'); + +__expected = ["\"sweep\""]; +__expected.index = 6; +__expected.input = 'alice "sweep": "don\'t"'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice \\u0022sweep\\u0022: "don\'t"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T7.js new file mode 100644 index 000000000..e88d1070d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T7; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /["'][^"']*["']/.exec('alice cries out: \'don\'t\'') and check results; +*/ + +__executed = /["'][^"']*["']/.exec('alice cries out: \'don\'t\''); + +__expected = ["\'don\'"]; +__expected.index = 17; +__expected.input = 'alice cries out: \'don\'t\''; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out: \'don\'t\'\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T8.js new file mode 100644 index 000000000..023e93570 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T8.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T8; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /["'][^"']*["']/.test('alice cries out: don\'t') and check results; +*/ + +__executed = /["'][^"']*["']/.test('alice cries out: don\'t'); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /["\'][^"\']*["\']/.test(\'alice cries out: don\'t\') === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T9.js new file mode 100644 index 000000000..6a42bc727 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A4_T9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A4_T9; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: * evaluates by returning the two results 0 and \infty; +* @description: Execute /["'][^"']*["']/.exec('alice cries out:\"\"') and check results; +*/ + +__executed = /["'][^"']*["']/.exec('alice cries out:\"\"'); + +__expected = ['\"\"']; +__expected.index = 16; +__expected.input = 'alice cries out:\"\"'; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /["\'][^"\']*["\']/.exec(\'alice cries out:\\"\\"\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T1.js new file mode 100644 index 000000000..51927cd67 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T1; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /java(script)?/.exec("state: javascript is extension of ecma script") and check results; +*/ + +__executed = /java(script)?/.exec("state: javascript is extension of ecma script"); + +__expected = ["javascript", "script"]; +__expected.index = 7; +__expected.input = "state: javascript is extension of ecma script"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /java(script)?/.exec("state: javascript is extension of ecma script"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T10.js new file mode 100644 index 000000000..9c928fc61 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T10.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T10; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /ab?c?d?x?y?z/.exec("123az789") and check results; +*/ + +__executed = /ab?c?d?x?y?z/.exec("123az789"); + +__expected = ["az"]; +__expected.index = 3; +__expected.input = "123az789"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /ab?c?d?x?y?z/.exec("123az789"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T11.js new file mode 100644 index 000000000..c2b46213b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T11.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T11; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /\??\??\??\??\??/.exec("?????") and check results; +*/ + +__executed = /\??\??\??\??\??/.exec("?????"); + +__expected = ["?????"]; +__expected.index = 0; +__expected.input = "?????"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\??\\??\\??\\??\\??/.exec("?????"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T12.js new file mode 100644 index 000000000..e580ebba5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T12.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T12; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /.?.?.?.?.?.?.?/.exec("test") and check results; +*/ + +__executed = /.?.?.?.?.?.?.?/.exec("test"); + +__expected = ["test"]; +__expected.index = 0; +__expected.input = "test"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /.?.?.?.?.?.?.?/.exec("test"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T2.js new file mode 100644 index 000000000..26f61340c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T2.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T2; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /java(script)?/.exec("state: java and javascript are vastly different") and check results; +*/ + +__executed = /java(script)?/.exec("state: java and javascript are vastly different"); + +__expected = ["java", undefined]; +__expected.index = 7; +__expected.input = "state: java and javascript are vastly different"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /java(script)?/.exec("state: java and javascript are vastly different"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T3.js new file mode 100644 index 000000000..854d4f369 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T3.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T3; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /java(script)?/.test("state: both Java and JavaScript used in web development") and check results; +*/ + +__executed = /java(script)?/.test("state: both Java and JavaScript used in web development"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /java(script)?/.test("state: both Java and JavaScript used in web development") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T4.js new file mode 100644 index 000000000..962063854 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T4; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /cd?e/.exec("abcdef") and check results; +*/ + +__executed = /cd?e/.exec("abcdef"); + +__expected = ["cde"]; +__expected.index = 2; +__expected.input = "abcdef"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /cd?e/.exec("abcdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /cd?e/.exec("abcdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /cd?e/.exec("abcdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /cd?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T5.js new file mode 100644 index 000000000..7fcf817cc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T5.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T5; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /cdx?e/.exec("abcdef") and check results; +*/ + +__executed = /cdx?e/.exec("abcdef"); + +__expected = ["cde"]; +__expected.index = 2; +__expected.input = "abcdef"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /cdx?e/.exec("abcdef"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /cdx?e/.exec("abcdef"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /cdx?e/.exec("abcdef"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /cdx?e/.exec("abcdef"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T6.js new file mode 100644 index 000000000..dbf41bde4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T6; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /o?pqrst/.exec("pqrstuvw") and check results; +*/ + +__executed = /o?pqrst/.exec("pqrstuvw"); + +__expected = ["pqrst"]; +__expected.index = 0; +__expected.input = "pqrstuvw"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /o?pqrst/.exec("pqrstuvw"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /o?pqrst/.exec("pqrstuvw"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T7.js new file mode 100644 index 000000000..33e387049 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T7; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /x?y?z?/.exec("abcd") and check results; +*/ + +__executed = /x?y?z?/.exec("abcd"); + +__expected = [""]; +__expected.index = 0; +__expected.input = "abcd"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /x?y?z?/.exec("abcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /x?y?z?/.exec("abcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /x?y?z?/.exec("abcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /x?y?z?/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T8.js new file mode 100644 index 000000000..46991c2ec --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T8; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /x?ay?bz?c/.exec("abcd") and check results; +*/ + +__executed = /x?ay?bz?c/.exec("abcd"); + +__expected = ["abc"]; +__expected.index = 0; +__expected.input = "abcd"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /x?ay?bz?c/.exec("abcd"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /x?ay?bz?c/.exec("abcd"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /x?ay?bz?c/.exec("abcd"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /x?ay?bz?c/.exec("abcd"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T9.js new file mode 100644 index 000000000..dce734b45 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A5_T9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A5_T9; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: ? evaluates by returning the two results 0 and 1; +* @description: Execute /b?b?b?b/.exec("abbbbc") and check results; +*/ + +__executed = /b?b?b?b/.exec("abbbbc"); + +__expected = ["bbbb"]; +__expected.index = 1; +__expected.input = "abbbbc"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b?b?b?b/.exec("abbbbc"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b?b?b?b/.exec("abbbbc"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b?b?b?b/.exec("abbbbc"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b?b?b?b/.exec("abbbbc"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T1.js new file mode 100644 index 000000000..e40cfc495 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T1.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T1; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /b{2,}c/.exec("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); + +__expected = ["bbbbc"]; +__expected.index = 3; +__expected.input = "aaabbbbcccddeeeefffff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /b{2,}c/.exec("aaabbbbcccddeeeefffff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T2.js new file mode 100644 index 000000000..55a5bd119 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T2; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /b{8,}c/.test("aaabbbbcccddeeeefffff") and check results; +*/ + +__executed = /b{8,}c/.test("aaabbbbcccddeeeefffff"); + +//CHECK#1 +if (__executed) { + $ERROR('#1: /b{8,}c/.test("aaabbbbcccddeeeefffff") === false'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T3.js new file mode 100644 index 000000000..b7a6fa1ec --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T3.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T3; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /\d{1,}/.exec("wqe456646dsff") and check results; +*/ + +__executed = /\d{1,}/.exec("wqe456646dsff"); + +__expected = ["456646"]; +__expected.index = 3; +__expected.input = "wqe456646dsff"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /\\d{1,}/.exec("wqe456646dsff"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T4.js new file mode 100644 index 000000000..5dbc330cb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T4.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T4; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /(123){1,}/.exec("123123") and check results; +*/ + +__executed = /(123){1,}/.exec("123123"); + +__expected = ["123123","123"]; +__expected.index = 0; +__expected.input = "123123"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(123){1,}/.exec("123123"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(123){1,}/.exec("123123"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(123){1,}/.exec("123123"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(123){1,}/.exec("123123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T5.js new file mode 100644 index 000000000..e75f01f43 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T5.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T5; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /(123){1,}x\1/.exec("123123x123") and check results; +*/ + +__executed = /(123){1,}x\1/.exec("123123x123"); + +__expected = ["123123x123","123"]; +__expected.index = 0; +__expected.input = "123123x123"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /(123){1,}x\\1\\/.exec("123123x123"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /(123){1,}x\\1/.exec("123123x123"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T6.js new file mode 100644 index 000000000..ebc6391f3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.7_Quantifier/S15.10.2.7_A6_T6.js @@ -0,0 +1,40 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.10.2.7_A6_T6; +* @section: 15.10.2.7; +* @assertion: The production QuantifierPrefix :: { DecimalDigits , }evaluates as follows: +* i) Let i be the MV of DecimalDigits +* ii) Return the two results i and \infty; +* @description: Execute /x{1,2}x{1,}/.exec("xxxxxxx") and check results; +*/ + +__executed = /x{1,2}x{1,}/.exec("xxxxxxx"); + +__expected = ["xxxxxxx"]; +__expected.index = 0; +__expected.input = "xxxxxxx"; + +//CHECK#1 +if (__executed.length !== __expected.length) { + $ERROR('#1: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length); +} + +//CHECK#2 +if (__executed.index !== __expected.index) { + $ERROR('#2: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index); +} + +//CHECK#3 +if (__executed.input !== __expected.input) { + $ERROR('#3: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input); +} + +//CHECK#4 +for(var index=0; index<__expected.length; index++) { + if (__executed[index] !== __expected[index]) { + $ERROR('#4: __executed = /x{1,2}x{1,}/.exec("xxxxxxx"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]); + } +} + |