v8/test/mjsunit/harmony/hashbang-eval.js
Caitlin Potter 6487ad7a33 [esnext] allow hashbang in eval() and unskip hashbang test262 tests
Fix original imlpementation to support occurrence in eval(), and unskip
tests.

BUG=v8:8523
r=gsathya@chromium.org, mathias@chromium.org, littledan@chromium.org

Change-Id: I80a3e8623357947c564a6cdf865eeff435b8e640
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1510792
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#60246}
2019-03-14 18:16:49 +00:00

12 lines
415 B
JavaScript

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-hashbang
// Hashbang syntax is allowed in eval.
assertEquals(eval("#!"), undefined);
assertEquals(eval("#!\n"), undefined);
assertEquals(eval("#!---IGNORED---"), undefined);
assertEquals(eval("#!---IGNORED---\n"), undefined);