diff options
author | Brian Terlson <brian.terlson@microsoft.com> | 2014-12-05 15:50:00 -0800 |
---|---|---|
committer | Brian Terlson <brian.terlson@microsoft.com> | 2014-12-07 15:33:09 -0800 |
commit | 2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8 (patch) | |
tree | 7315f60ffd86513bf163c05e4252fab0810bfbe8 /test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js | |
parent | da465e7399bcecd3c78fa1f5e898c9d52b4c7096 (diff) | |
download | qtdeclarative-testsuites-2a74f0ec1b671f15fc7df3e1e294a65abc8ebac8.tar.gz |
Reorganize ./test
Diffstat (limited to 'test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js')
-rw-r--r-- | test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js new file mode 100644 index 000000000..d0a5bad3f --- /dev/null +++ b/test/built-ins/String/prototype/replace/S15.5.4.11_A2_T7.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: > + The $ replacements are done left-to-right, and, once such are placement is performed, the new + replacement text is not subject to further replacements +es5id: 15.5.4.11_A2_T7 +description: Use $$ in replaceValue, searchValue is regular expression /sh/ +---*/ + +var __str = 'She sells seashells by the seashore.'; +var __re = /sh/; + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if (__str.replace(__re, "$$" + 'sch')!=='She sells sea$schells by the seashore.') { + $ERROR('#1: var __str = \'She sells seashells by the seashore.\'; var __re = /sh/; __str.replace(__re, "$$" + \'sch\')===\'She sells sea$schells by the seashore.\'. Actual: '+__str.replace(__re, "$$" + 'sch')); +} +// +////////////////////////////////////////////////////////////////////////////// |