• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/04_modules/11_import_many_exec_once

  1 When multiple imports refer to the same module, the module will only be
  2 executed once. The equivalence of module paths is tested after canonicalizing
  3 the requested path.
  4 
  5 -- Testcase --
  6 import { counter as counter1 } from "./files/test/example.uc";
  7 import { counter as counter2 } from "files/test/example.uc";
  8 import { counter as counter3 } from "test.example";
  9 
 10 print([ counter1, counter2, counter3 ], "\n");
 11 -- End --
 12 
 13 -- File test/example.uc --
 14 print("This is the test module running\n");
 15 
 16 export let counter = 0;
 17 
 18 counter++;
 19 -- End --
 20 
 21 -- Args --
 22 -R -L ./files
 23 -- End --
 24 
 25 -- Expect stdout --
 26 This is the test module running
 27 [ 1, 1, 1 ]
 28 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt