Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / js / kde / StringObject-expected.txt
1 KDE JS Test
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 PASS 'abc'.length is 3
7 PASS (new String('abcd')).length is 4
8 PASS String('abcde').length is 5
9 PASS 'abc'.charAt(0) is 'a'
10 PASS 'abc'.charAt(1) is 'b'
11 PASS 'abc'.charAt(-1) is ''
12 PASS 'abc'.charAt(99) is ''
13 PASS 'abc'.charAt() is 'a'
14 PASS 'ab'.indexOf('a') is 0
15 PASS 'ab'.indexOf('b') is 1
16 PASS 'ab'.indexOf('x') is -1
17 PASS 'ab'.indexOf('') is 0
18 PASS ''.indexOf('') is 0
19 PASS 'ab'.indexOf('a', -1) is 0
20 PASS 'ab'.indexOf('b', 1) is 1
21 PASS 'ab'.indexOf('a', 1) is -1
22 PASS '  '.indexOf('', 1) is 1
23 PASS String('abc').search(/b/) is 1
24 PASS String('xyz').search(/b/) is -1
25 PASS String('abcb').match(/b/) + '' is 'b'
26 PASS typeof String('abc').match(/b/) is 'object'
27 PASS 'xyz'.match(/b/) is null
28 PASS 'xyz'.match(/b/g) is null
29 PASS String('aabab'.match(/ab/g)) is 'ab,ab'
30 PASS String('aabab'.match(/(a)(b)/)) is 'ab,a,b'
31 PASS String('aabab'.match(/(a)(b)/g)) is 'ab,ab'
32 PASS String('abc'.match(/./g)) is 'a,b,c'
33 PASS String('abc'.match(/.*/g)) is 'abc,'
34 PASS var reg = /ab/g; 'aabab'.match(reg); reg.lastIndex is 0
35 PASS var reg = /ab/g; 'aabab'.match(reg).length is 2
36 PASS var reg = /ab/g; 'xxx'.match(reg); reg.lastIndex is 0
37 PASS var reg = /ab/g; 'xxx'.match(reg) is null
38 PASS myRe=/d(b+)d/g;  'cdbbdbsbz'.match(myRe)[0] is 'dbbd'
39 PASS 'abcd'.replace(/b./, 'xy') is 'axyd'
40 PASS 'abcd'.replace('bc', 'x') is 'axd'
41 PASS 'abcd'.replace('x', 'y') is 'abcd'
42 PASS 'abcd'.replace(/(ab)(cd)/,'$2$1') is 'cdab'
43 PASS 'abcd'.replace(/(ab)(cd)/,'$2$1$') is 'cdab$'
44 PASS 'BEGINabcEND'.replace(/abc/,'x$') is 'BEGINx$END'
45 PASS f2c('The value is 212F') is 'The value is 100C'
46 PASS f2c_str is '212F'
47 PASS f2c_p1 is '212'
48 PASS f2c_offset is 13
49 PASS f2c_s is 'The value is 212F'
50 PASS 'axb'.split('x').length is 2
51 PASS 'axb'.split('x')[0] is 'a'
52 PASS 'axb'.split('x')[1] is 'b'
53 PASS String('abc'.split('')) is 'a,b,c'
54 PASS String('abc'.split(new RegExp())) is 'a,b,c'
55 PASS ''.split('').length is 0
56 PASS 'axb'.split('x', 0).length is 0
57 PASS 'axb'.split('x', 0)[0] is undefined
58 PASS 'axb'.split('x', 1).length is 1
59 PASS 'axb'.split('x', 99).length is 2
60 PASS 'axb'.split('y') + '' is 'axb'
61 PASS 'axb'.split('y').length is 1
62 PASS ''.split('x') + '' is ''
63 PASS 'abc'.split() + '' is 'abc'
64 PASS 'axxb'.split(/x/) + '' is 'a,,b'
65 PASS 'axxb'.split(/x+/) + '' is 'a,b'
66 PASS 'axxb'.split(/x*/) + '' is 'a,b'
67 PASS 'abcdef'.slice(2, 5) is 'cde'
68 PASS 'abcdefghijklmnopqrstuvwxyz1234567890'.slice(-32, -6) is 'efghijklmnopqrstuvwxyz1234'
69 PASS 'abC1'.toUpperCase() is 'ABC1'
70 PASS 'AbC2'.toLowerCase() is 'abc2'
71 PASS 'a'.localeCompare('a') is 0
72 PASS 'a'.localeCompare('aa') < 0 is true
73 PASS 'a'.localeCompare('x') < 0 is true
74 PASS 'x'.localeCompare('a') > 0 is true
75 PASS ''.localeCompare('') is 0
76 FAIL ''.localeCompare() should be 0. Was -1.
77 PASS ''.localeCompare(undefined) is -1
78 PASS ''.localeCompare(null) is -1
79 PASS 'a'.localeCompare('') is 1
80 FAIL 'a'.localeCompare() should be 0. Was -1.
81 PASS 'abc'[0] is 'a'
82 PASS 'abc'[-1] is undefined.
83 PASS 'abc'[-4] is undefined.
84 PASS 'abc'[10] is undefined.
85 PASS 'abc'[10] is 'x'
86 PASS bar is html
87 PASS successfullyParsed is true
88
89 TEST COMPLETE
90