Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid relative imports outside of test directory #4407

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ flags: [module, raw]

throw "Test262: This statement should not be evaluated.";

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import * as x from './import-attribute-1_FIXTURE.js'
with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {if:''};
import './import-attribute-2_FIXTURE.js' with {if:''};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {"test262\u0078":''};
import './import-attribute-2_FIXTURE.js' with {"test262\u0078":''};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {'test262\u0078':''};
import './import-attribute-2_FIXTURE.js' with {'test262\u0078':''};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
import './import-attribute-2_FIXTURE.js' with {test262_1:'',test262_2:'',test262_3:'',test262_4:''};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {test262:'',};
import './import-attribute-2_FIXTURE.js' with {test262:'',};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {test262:"\u0078"};
import './import-attribute-2_FIXTURE.js' with {test262:"\u0078"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ flags: [module]

$DONOTEVALUATE();

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import x from './import-attribute-1_FIXTURE.js' with {test262:'\u0078'};
import './import-attribute-2_FIXTURE.js' with {test262:'\u0078'};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

// When imported, this file will ensure that a linking error happens by
// importing a non-existent binding.
// It can be used to assert that there is a linking error, which means
// that there are no parsing errors.

import { nonExistent } from "./ensure-linking-error_FIXTURE.js";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// ImportDeclaration:
// import source ImportedBinding FromClause ;

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import source source from '<do not resolve>';
import source from from '<do not resolve>';
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// ImportDeclaration:
// import source ImportedBinding FromClause ;

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import source from '<do not resolve>';
import from from '<do not resolve>';
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// 16.2.1.7.2 GetModuleSource ( )
// Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.

import "../resources/ensure-linking-error_FIXTURE.js";
import "./ensure-linking-error_FIXTURE.js";

import

Expand Down