1 2 3 4 5 6 7 8 9 10 11 12 13 14
from std/defer import Guard; from test/more import *; let String out := "a"; { let Object defer := new Guard( callback: function() { out _= "c"; } ); out _= "b"; } out _= "d"; is( out, "abcd" ); done_testing();