mirror of https://github.com/tc39/test262.git
Correct tests for line terminators within comments
Four tests were documented as asserting the interpretation of line terminators within multi-line comments, but the source code did not actually demonstrate this condition. Introduce new tests that demonstrate the intended functionality and place them in the correct directory.
This commit is contained in:
parent
b53b8e3f0e
commit
41110ab0d4
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.4
|
||||
esid: sec-comments
|
||||
description: >
|
||||
A multi-line comment containing a carriage return should be considered a
|
||||
LineTerminator
|
||||
info: >
|
||||
Comments behave like white space and are discarded except that, if a
|
||||
MultiLineComment contains a line terminator code point, then the entire
|
||||
comment is considered to be a LineTerminator for purposes of parsing by the
|
||||
syntactic grammar.
|
||||
---*/
|
||||
|
||||
''/*
*/''
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.4
|
||||
esid: sec-comments
|
||||
description: >
|
||||
A multi-line comment containing a line feed should be considered a
|
||||
LineTerminator
|
||||
info: >
|
||||
Comments behave like white space and are discarded except that, if a
|
||||
MultiLineComment contains a line terminator code point, then the entire
|
||||
comment is considered to be a LineTerminator for purposes of parsing by the
|
||||
syntactic grammar.
|
||||
---*/
|
||||
|
||||
''/*
|
||||
*/''
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.4
|
||||
esid: sec-comments
|
||||
description: >
|
||||
A multi-line comment containing a line separator should be considered a
|
||||
LineTerminator
|
||||
info: >
|
||||
Comments behave like white space and are discarded except that, if a
|
||||
MultiLineComment contains a line terminator code point, then the entire
|
||||
comment is considered to be a LineTerminator for purposes of parsing by the
|
||||
syntactic grammar.
|
||||
---*/
|
||||
|
||||
''/*
*/''
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.4
|
||||
esid: sec-comments
|
||||
description: >
|
||||
A multi-line comment containing a paragrah separator should be considered a
|
||||
LineTerminator
|
||||
info: >
|
||||
Comments behave like white space and are discarded except that, if a
|
||||
MultiLineComment contains a line terminator code point, then the entire
|
||||
comment is considered to be a LineTerminator for purposes of parsing by the
|
||||
syntactic grammar.
|
||||
---*/
|
||||
|
||||
''/*
*/''
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.3-11
|
||||
description: >
|
||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||
terminator character <LS> (\u2028) must be treated as a single
|
||||
line terminator for the purposes of semicolon insertion
|
||||
---*/
|
||||
|
||||
/*MultiLine
|
||||
Comments
|
||||
\u2028 var = ;
|
||||
*/
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.3-12
|
||||
description: >
|
||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||
terminator character <PS> (\u2029) must be treated as a single
|
||||
line terminator for the purposes of semicolon insertion
|
||||
---*/
|
||||
|
||||
/*MultiLine
|
||||
Comments
|
||||
\u2029 var = ;
|
||||
*/
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.3-13
|
||||
description: >
|
||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||
terminator character <CR> (\u000D) must be treated as a single
|
||||
line terminator for the purposes of semicolon insertion
|
||||
---*/
|
||||
|
||||
/*MultiLine
|
||||
Comments
|
||||
\u000D var = ;
|
||||
*/
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 7.3-14
|
||||
description: >
|
||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||
terminator character <LF> (\u000A) must be treated as a single
|
||||
line terminator for the purposes of semicolon insertion
|
||||
---*/
|
||||
|
||||
/*MultiLine
|
||||
Comments
|
||||
\u000A var = ;
|
||||
*/
|
Loading…
Reference in New Issue