summaryrefslogtreecommitdiffstats
path: root/tests/019/pct-fun.tl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/019/pct-fun.tl')
-rw-r--r--tests/019/pct-fun.tl41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/019/pct-fun.tl b/tests/019/pct-fun.tl
new file mode 100644
index 00000000..eae0d9bb
--- /dev/null
+++ b/tests/019/pct-fun.tl
@@ -0,0 +1,41 @@
+(load "../common")
+
+(defstruct foo ()
+ (:init (me) (prinl %fun%))
+ (:fini (me) (prinl %fun%))
+ (:postinit (me) (prinl %fun%))
+ (:postfini (me) (prinl %fun%))
+ (:method foo (me) (prinl %fun%)))
+
+(defmeth foo bar (me)
+ (prinl %fun%))
+
+(defmeth foo pat (:match)
+ (prinl %fun%))
+
+(defun function (: (optarg %fun%))
+ (prinl %fun%))
+
+(defun function2 (: (optarg %fun%))
+ (prinl optarg))
+
+(defmacro mac ()
+ (prinl %fun%)
+ nil)
+
+(with-objects ((f (new foo)))
+ f.(foo)
+ f.(pat)
+ f.(bar))
+
+(function)
+(function2)
+
+(mac)
+
+(test %fun% nil)
+
+(compile-only
+ (eval-only
+ (compile-file (base-name *load-path*) "temp.tlo")
+ (remove-path "temp.tlo")))