1#                                                                    -*-perl-*-
2$description = "Test the realpath functions.";
3
4$details = "";
5
6run_make_test('
7ifneq ($(realpath .),$(CURDIR))
8  $(error )
9endif
10
11ifneq ($(realpath ./),$(CURDIR))
12  $(error )
13endif
14
15ifneq ($(realpath .///),$(CURDIR))
16  $(error )
17endif
18
19ifneq ($(realpath /),/)
20  $(error )
21endif
22
23ifneq ($(realpath /.),/)
24  $(error )
25endif
26
27ifneq ($(realpath /./),/)
28  $(error )
29endif
30
31ifneq ($(realpath /.///),/)
32  $(error )
33endif
34
35ifneq ($(realpath /..),/)
36  $(error )
37endif
38
39ifneq ($(realpath /../),/)
40  $(error )
41endif
42
43ifneq ($(realpath /..///),/)
44  $(error )
45endif
46
47ifneq ($(realpath . /..),$(CURDIR) /)
48  $(error )
49endif
50
51.PHONY: all
52all: ; @:
53',
54              '',
55              '');
56
57# On Windows platforms, "//" means something special.  So, don't do these
58# tests there.
59
60if ($port_type ne 'W32') {
61  run_make_test('
62ifneq ($(realpath ///),/)
63  $(error )
64endif
65
66ifneq ($(realpath ///.),/)
67  $(error )
68endif
69
70ifneq ($(realpath ///..),/)
71  $(error )
72endif
73
74.PHONY: all
75all: ; @:',
76                '',
77                '');
78}
79
80
81# This tells the test driver that the perl test script executed properly.
821;
83