build/pymake/tests/file-functions-symlinks.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/pymake/tests/file-functions-symlinks.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,22 @@
     1.4 +#T returncode-on: {'win32': 2}
     1.5 +$(shell \
     1.6 +touch test.file; \
     1.7 +ln -s test.file test.symlink; \
     1.8 +ln -s test.missing missing.symlink; \
     1.9 +touch .testhidden; \
    1.10 +mkdir foo; \
    1.11 +touch foo/testfile; \
    1.12 +ln -s foo symdir; \
    1.13 +)
    1.14 +
    1.15 +all:
    1.16 +	test "$(abspath test.file test.symlink)" = "$(CURDIR)/test.file $(CURDIR)/test.symlink"
    1.17 +	test "$(realpath test.file test.symlink)" = "$(CURDIR)/test.file $(CURDIR)/test.file"
    1.18 +	test "$(sort $(wildcard *))" = "foo symdir test.file test.symlink"
    1.19 +	test "$(sort $(wildcard .*))" = ". .. .testhidden"
    1.20 +	test "$(sort $(wildcard test*))" = "test.file test.symlink"
    1.21 +	test "$(sort $(wildcard foo/*))" = "foo/testfile"
    1.22 +	test "$(sort $(wildcard ./*))" = "./foo ./symdir ./test.file ./test.symlink"
    1.23 +	test "$(sort $(wildcard f?o/*))" = "foo/testfile"
    1.24 +	test "$(sort $(wildcard */*))" = "foo/testfile symdir/testfile"
    1.25 +	@echo TEST-PASS

mercurial