Function.prototype.toString no longer does line terminator normalisation (#820)

This commit is contained in:
Michael Ficarra 2017-01-09 14:25:02 -08:00 committed by Tom Care
parent 4ff7e4342e
commit 9737f3704f
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
description: Function.prototype.toString line terminator normalisation (CR-LF)
info: >
Function.prototype.toString should normalise line terminator sequences to Line Feed characters.
Function.prototype.toString should not normalise line terminator sequences to Line Feed characters.
This file uses (Carriage Return, Line Feed) sequences as line terminators.
---*/
@ -33,4 +33,4 @@ y
}
// after
assert.sameValue(f.toString(), "function\n// a\nf\n// b\n(\n// c\nx\n// d\n,\n// e\ny\n// f\n)\n// g\n{\n// h\n;\n// i\n;\n// j\n}");
assert.sameValue(f.toString(), "function\r\n// a\r\nf\r\n// b\r\n(\r\n// c\r\nx\r\n// d\r\n,\r\n// e\r\ny\r\n// f\r\n)\r\n// g\r\n{\r\n// h\r\n;\r\n// i\r\n;\r\n// j\r\n}");

View File

@ -1 +1 @@
// Copyright (C) 2016 Michael Ficarra. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject description: Function.prototype.toString line terminator normalisation (CR) info: > Function.prototype.toString should normalise line terminator sequences to Line Feed characters. This file uses Carriage Return characters as line terminators. ---*/ // before function // a f // b ( // c x // d , // e y // f ) // g { // h ; // i ; // j } // after assert.sameValue(f.toString(), "function\n// a\nf\n// b\n(\n// c\nx\n// d\n,\n// e\ny\n// f\n)\n// g\n{\n// h\n;\n// i\n;\n// j\n}");
// Copyright (C) 2016 Michael Ficarra. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject description: Function.prototype.toString line terminator normalisation (CR) info: > Function.prototype.toString should not normalise line terminator sequences to Line Feed characters. This file uses Carriage Return characters as line terminators. ---*/ // before function // a f // b ( // c x // d , // e y // f ) // g { // h ; // i ; // j } // after assert.sameValue(f.toString(), "function\r// a\rf\r// b\r(\r// c\rx\r// d\r,\r// e\ry\r// f\r)\r// g\r{\r// h\r;\r// i\r;\r// j\r}");

View File

@ -5,7 +5,7 @@
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
description: Function.prototype.toString line terminator normalisation (LF)
info: >
Function.prototype.toString should normalise line terminator sequences to Line Feed characters.
Function.prototype.toString should not normalise line terminator sequences to Line Feed characters.
This file uses Line Feed characters as line terminators.
---*/