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

Sources/ucode/tests/custom/04_modules/13_import_liveness

  1 Imported bindings to exported module variables are live, they'll reflect
  2 every change to the exported variable values.
  3 
  4 -- Testcase --
  5 import { counter, count } from "./files/test.uc";
  6 
  7 print(counter, "\n");
  8 count();
  9 print(counter, "\n");
 10 -- End --
 11 
 12 -- File test.uc --
 13 let counter = 1;
 14 
 15 function count() {
 16         counter++;
 17 }
 18 
 19 export { counter, count };
 20 -- End --
 21 
 22 -- Args --
 23 -R
 24 -- End --
 25 
 26 -- Expect stdout --
 27 1
 28 2
 29 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt