summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/comments/hashbang/eval-indirect.js
blob: 2e43a6fd59e3ed8d2c512600312fcee4afa0e493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: pending
description: >
    Hashbang comments should be available in Script evaluator contexts. (indirect eval)
info: |
    HashbangComment::
      #! SingleLineCommentChars[opt]
features: [hashbang]
---*/

assert.sameValue((0, eval)('#!\n'), undefined);
assert.sameValue((0, eval)('#!\n1'), 1)
assert.sameValue((0, eval)('#!2\n'), undefined);

reportCompare(0, 0);