import-source-newlines_FIXTURE.js (1054B)
1 // |reftest| skip -- not a test file 2 // Copyright (C) 2024 Chengzhong Wu. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 // import source in ImportDeclaration may include line terminators 6 // This test is verified with `import-source.js` in the same directory that 7 // this file does not raise SyntaxError. Note that a SyntaxError could also 8 // be raised when the imported module does not have a source phase 9 // representation (see sec-source-text-module-record-initialize-environment, 7.c.ii). 10 // 11 // esid: sec-modules 12 // info: | 13 // ImportDeclaration: 14 // import source ImportedBinding FromClause ; 15 // 16 // This test uses all four LineFeed characters in order to completely verify the 17 // grammar. 18 // 19 // 16.2.1.7.2 GetModuleSource ( ) 20 // Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available. 21 22 import "./ensure-linking-error_FIXTURE.js"; 23 24 import 25 26 source 27 28 y from '<do not resolve>';