Răsfoiți Sursa

module: test load twice

Oguz Bastemur 8 ani în urmă
părinte
comite
9df05b29cc
2 a modificat fișierele cu 17 adăugiri și 0 ștergeri
  1. 12 0
      test/es6module/module-load-twice.js
  2. 5 0
      test/es6module/rlexe.xml

+ 12 - 0
test/es6module/module-load-twice.js

@@ -0,0 +1,12 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+WScript.RegisterModuleSource('a.js', " ");
+WScript.LoadScriptFile('a.js');
+WScript.LoadScriptFile('a.js');
+WScript.RegisterModuleSource('b.js', "import * as foo from 'a.js'");
+WScript.LoadScriptFile('b.js', "module");
+WScript.LoadScriptFile('b.js', "module");
+print('pass');

+ 5 - 0
test/es6module/rlexe.xml

@@ -141,4 +141,9 @@
       <tags>BugFix,exclude_sanitize_address</tags>
     </default>
   </test>
+  <test>
+    <default>
+      <files>module-load-twice.js</files>
+    </default>
+  </test>
 </regress-exe>