aboutsummaryrefslogtreecommitdiffstats
path: root/test-files/mds-kbdc/compile-layout/valid
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-10 01:16:09 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-10 01:16:09 +0100
commit58d10b17ca767635b1e38cb2e57d07438478571b (patch)
treed4526e6328f2c3dee737279275cb39a0f6db254e /test-files/mds-kbdc/compile-layout/valid
parentmds-kbdc: compile-layout: m + more test cases (diff)
downloadmds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.gz
mds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.bz2
mds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.xz
mds-kbdc: compile-layout: m bug fix + more test cases
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'test-files/mds-kbdc/compile-layout/valid')
-rw-r--r--test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function7
-rw-r--r--test-files/mds-kbdc/compile-layout/valid/overloaded_function10
-rw-r--r--test-files/mds-kbdc/compile-layout/valid/overloaded_macro9
-rw-r--r--test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function8
4 files changed, 34 insertions, 0 deletions
diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function b/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function
new file mode 100644
index 0000000..e13d291
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_builtin_function
@@ -0,0 +1,7 @@
+function add/3
+ \add(\1 \add(\2 \3))
+end function
+if \not(\equals(\add(1 2 3) 6))
+ "" : 0
+end if
+
diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_function b/test-files/mds-kbdc/compile-layout/valid/overloaded_function
new file mode 100644
index 0000000..70bc5b0
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_function
@@ -0,0 +1,10 @@
+function f/0
+ 1
+end function
+function f/1
+ \1
+end function
+if \equals(\f() \f(2))
+ "" : 0
+end if
+
diff --git a/test-files/mds-kbdc/compile-layout/valid/overloaded_macro b/test-files/mds-kbdc/compile-layout/valid/overloaded_macro
new file mode 100644
index 0000000..d9bdd41
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/valid/overloaded_macro
@@ -0,0 +1,9 @@
+macro m/1
+ "" : \1
+end macro
+macro m/2
+ \add(1 \1) : 2
+end macro
+m(1)
+m(0 1)
+
diff --git a/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function b/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function
new file mode 100644
index 0000000..8703e7a
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/valid/samenamed_macro_and_function
@@ -0,0 +1,8 @@
+function c/0
+ "a"
+end function
+macro c/0
+ \c() : \c()
+end macro
+c()
+