blob: 0b5b1023daf34a022712b0c120976268171f7283 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright (C) 2016 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-string.prototype.padend
description: String#padEnd should work in the general case
author: Jordan Harband
---*/
assert.sameValue('abc'.padEnd(7, 'def'), 'abcdefd');
assert.sameValue('abc'.padEnd(5, '*'), 'abc**');
// surrogate pairs
assert.sameValue('abc'.padEnd(6, '\uD83D\uDCA9'), 'abc\uD83D\uDCA9\uD83D');
reportCompare(0, 0);
|