From d5076e3e8e665a5b666b65d4772f122d17d0087e Mon Sep 17 00:00:00 2001 From: jugglinmike Date: Mon, 18 Mar 2019 21:23:08 -0400 Subject: [PATCH] Add tests for termination of "hashbang" comment (#2104) --- .../line-terminator-carriage-return.js | 28 +++++++++++++++++++ .../line-terminator-line-separator.js | 28 +++++++++++++++++++ .../line-terminator-paragraph-separator.js | 28 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 test/language/comments/hashbang/line-terminator-carriage-return.js create mode 100644 test/language/comments/hashbang/line-terminator-line-separator.js create mode 100644 test/language/comments/hashbang/line-terminator-paragraph-separator.js diff --git a/test/language/comments/hashbang/line-terminator-carriage-return.js b/test/language/comments/hashbang/line-terminator-carriage-return.js new file mode 100644 index 0000000000..f8cc382a5f --- /dev/null +++ b/test/language/comments/hashbang/line-terminator-carriage-return.js @@ -0,0 +1,28 @@ +#! this comment ends with a Carriage Return (U+000D) { +} + +// Copyright (C) 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: > + Hashbang comments are terminated by the first LineTerminator: Carriage Return +info: | + HashbangComment:: + #! SingleLineCommentChars[opt] + + SingleLineCommentChars:: + SingleLineCommentChar SingleLineCommentChars[opt] + + SingleLineCommentChar:: + SourceCharacter but not LineTerminator + + LineTerminator:: + + + + +flags: [raw] +features: [hashbang] +---*/ diff --git a/test/language/comments/hashbang/line-terminator-line-separator.js b/test/language/comments/hashbang/line-terminator-line-separator.js new file mode 100644 index 0000000000..20d917be6f --- /dev/null +++ b/test/language/comments/hashbang/line-terminator-line-separator.js @@ -0,0 +1,28 @@ +#! this comment ends with a Line Separator (U+2028)
{ +} + +// Copyright (C) 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: > + Hashbang comments are terminated by the first LineTerminator: Line Separator +info: | + HashbangComment:: + #! SingleLineCommentChars[opt] + + SingleLineCommentChars:: + SingleLineCommentChar SingleLineCommentChars[opt] + + SingleLineCommentChar:: + SourceCharacter but not LineTerminator + + LineTerminator:: + + + + +flags: [raw] +features: [hashbang] +---*/ diff --git a/test/language/comments/hashbang/line-terminator-paragraph-separator.js b/test/language/comments/hashbang/line-terminator-paragraph-separator.js new file mode 100644 index 0000000000..abfa4f6daa --- /dev/null +++ b/test/language/comments/hashbang/line-terminator-paragraph-separator.js @@ -0,0 +1,28 @@ +#! this comment ends with a Paragraph Separator (U+2029)
{ +} + +// Copyright (C) 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: pending +description: > + Hashbang comments are terminated by the first LineTerminator: Paragraph Separator +info: | + HashbangComment:: + #! SingleLineCommentChars[opt] + + SingleLineCommentChars:: + SingleLineCommentChar SingleLineCommentChars[opt] + + SingleLineCommentChar:: + SourceCharacter but not LineTerminator + + LineTerminator:: + + + + +flags: [raw] +features: [hashbang] +---*/