Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
bfarias-godaddy committed Dec 3, 2018
1 parent 3ddcec6 commit ae639b4
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 14 deletions.
4 changes: 3 additions & 1 deletion test/language/comments/hashbang-eval.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2018 GoDaddy. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
Expand All @@ -7,4 +9,4 @@ info: |
#! SingleLineCommentChars[opt]
---*/

eval('#!\n');
assert.sameValue(eval('#!\n'), undefined);
10 changes: 6 additions & 4 deletions test/language/comments/hashbang-function-constructor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2018 Mike Pennisi. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: pending
description: >
Expand All @@ -16,8 +18,8 @@ for (ctor of [
GeneratorFunction,
AsyncGeneratorFunction,
]) {
assert.throws(SyntaxError, () => ctor('#!\n_',''));
assert.throws(SyntaxError, () => ctor('#!\n_'));
assert.throws(SyntaxError, () => new ctor('#!\n_',''));
assert.throws(SyntaxError, () => new ctor('#!\n_'));
assert.throws(SyntaxError, () => ctor('#!\n_',''), `${ctor.name} Call argument`);
assert.throws(SyntaxError, () => ctor('#!\n_'), `${ctor.name} Call body`);
assert.throws(SyntaxError, () => new ctor('#!\n_',''), `${ctor.name} Construct argument`);
assert.throws(SyntaxError, () => new ctor('#!\n_'), `${ctor.name} Construct body`);
}
2 changes: 1 addition & 1 deletion test/language/comments/hashbang-multi-line-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
1 change: 1 addition & 0 deletions test/language/comments/hashbang-no-line-separator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
---*/

eval('#!');
1 change: 1 addition & 0 deletions test/language/comments/hashbang-not-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
---*/

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
2 changes: 1 addition & 1 deletion test/language/comments/hashbang-preceding-hashbang.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
2 changes: 1 addition & 1 deletion test/language/comments/hashbang-preceding-line-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
4 changes: 2 additions & 2 deletions test/language/comments/hashbang-preceding-whitespace.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh
#!
/*---
esid: pending
description: >
Hashbang comments should only be allowed at the start of source texts and should not be preceded by whitespace.
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
2 changes: 1 addition & 1 deletion test/language/comments/hashbang-statement-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
negative:
phase: parse
type: SyntaxError
Expand Down
1 change: 1 addition & 0 deletions test/language/comments/hashbang-use-strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >
info: |
HashbangComment::
#! SingleLineCommentChars[opt]
flags: [raw]
---*/

with ({}) {}

0 comments on commit ae639b4

Please sign in to comment.