summaryrefslogtreecommitdiffstats
path: root/build/pymake/tests/file-functions.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build/pymake/tests/file-functions.mk')
-rw-r--r--build/pymake/tests/file-functions.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/build/pymake/tests/file-functions.mk b/build/pymake/tests/file-functions.mk
new file mode 100644
index 000000000..7e4c68e85
--- /dev/null
+++ b/build/pymake/tests/file-functions.mk
@@ -0,0 +1,19 @@
+$(shell \
+touch test.file; \
+touch .testhidden; \
+mkdir foo; \
+touch foo/testfile; \
+)
+
+all:
+ test "$(abspath test.file)" = "$(CURDIR)/test.file"
+ test "$(realpath test.file)" = "$(CURDIR)/test.file"
+ test "$(sort $(wildcard *))" = "foo test.file"
+# commented out because GNU make matches . and .. while python doesn't, and I don't
+# care enough
+# test "$(sort $(wildcard .*))" = ". .. .testhidden"
+ test "$(sort $(wildcard test*))" = "test.file"
+ test "$(sort $(wildcard foo/*))" = "foo/testfile"
+ test "$(sort $(wildcard ./*))" = "./foo ./test.file"
+ test "$(sort $(wildcard f?o/*))" = "foo/testfile"
+ @echo TEST-PASS