summaryrefslogtreecommitdiffstats
path: root/src/kmk/testcase-root.kmk
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmk/testcase-root.kmk')
-rw-r--r--src/kmk/testcase-root.kmk30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/kmk/testcase-root.kmk b/src/kmk/testcase-root.kmk
new file mode 100644
index 0000000..92de5c5
--- /dev/null
+++ b/src/kmk/testcase-root.kmk
@@ -0,0 +1,30 @@
+#
+# The $(root ...) and $(notroot ) functions.
+#
+
+
+
+x := $(root /a)
+y := $(notroot /a)
+ifneq ($x,/)
+ $(error x=$x)
+endif
+ifneq ($y,a)
+ $(error y=$y)
+endif
+
+x := $(root /a /b /)
+y := $(notroot /a /b /)
+ifneq ($x,/ / /)
+ $(error x=$x)
+endif
+ifneq ($y,a b .)
+ $(error y=$y)
+endif
+
+
+# dummy
+all:
+ echo The root and notroot functions works.
+
+