summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/closure-proto.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/closure-proto.t b/t/closure-proto.t
new file mode 100644
index 0000000..fbd05af
--- /dev/null
+++ b/t/closure-proto.t
@@ -0,0 +1,19 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Test::More;
+
+use Fun;
+
+{
+ my $x = 10;
+
+ fun bar ($y) {
+ $x * $y
+ }
+}
+
+is(bar(3), 30);
+
+done_testing;