S15.10.2.8_A3_T3.js (948B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 Parentheses of the form ( Disjunction ) serve both to group the components of the Disjunction pattern together and to save the result of the match. 7 The result can be used either in a backreference (\ followed by a nonzero decimal number), 8 referenced in a replace string, 9 or returned as part of an array from the regular expression matching function 10 es5id: 15.10.2.8_A3_T3 11 description: > 12 Execute /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing 13 with JavaScript is dangerous, do not try it without assistance") 14 and check results 15 ---*/ 16 17 var __executed = /([Jj]ava([Ss]cript)?)\sis\s(fun\w*)/.test("Developing with JavaScript is dangerous, do not try it without assistance"); 18 19 assert(!__executed, 'The value of !__executed is expected to be true'); 20 21 reportCompare(0, 0);