summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/019/pct-fun.expected18
-rw-r--r--tests/019/pct-fun.tl41
2 files changed, 59 insertions, 0 deletions
diff --git a/tests/019/pct-fun.expected b/tests/019/pct-fun.expected
new file mode 100644
index 00000000..d7da7ee4
--- /dev/null
+++ b/tests/019/pct-fun.expected
@@ -0,0 +1,18 @@
+(foo :init)
+(foo :postinit)
+(foo foo)
+(foo bar)
+(foo :fini)
+(foo :postfini)
+function
+function2
+mac
+(foo :init)
+(foo :postinit)
+(foo foo)
+(foo bar)
+(foo :fini)
+(foo :postfini)
+function
+function2
+mac
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")))