1 | # -*-perl-*-
|
---|
2 | $description = "Test the abspath functions.";
|
---|
3 |
|
---|
4 | $details = "";
|
---|
5 |
|
---|
6 | run_make_test('
|
---|
7 | ifneq ($(realpath $(abspath .)),$(CURDIR))
|
---|
8 | $(warning .: abs="$(abspath .)" real="$(realpath $(abspath .))" curdir="$(CURDIR)")
|
---|
9 | endif
|
---|
10 |
|
---|
11 | ifneq ($(realpath $(abspath ./)),$(CURDIR))
|
---|
12 | $(warning ./: abs="$(abspath ./)" real="$(realpath $(abspath ./))" curdir="$(CURDIR)")
|
---|
13 | endif
|
---|
14 |
|
---|
15 | ifneq ($(realpath $(abspath .///)),$(CURDIR))
|
---|
16 | $(warning .///: abs="$(abspath .///)" real="$(realpath $(abspath .///))" curdir="$(CURDIR)")
|
---|
17 | endif
|
---|
18 |
|
---|
19 | ifneq ($(abspath /),/)
|
---|
20 | $(warning /: abspath="$(abspath /)")
|
---|
21 | endif
|
---|
22 |
|
---|
23 | ifneq ($(abspath ///),/)
|
---|
24 | $(warning ///: abspath="$(abspath ///)")
|
---|
25 | endif
|
---|
26 |
|
---|
27 | ifneq ($(abspath /.),/)
|
---|
28 | $(warning /.: abspath="$(abspath /.)")
|
---|
29 | endif
|
---|
30 |
|
---|
31 | ifneq ($(abspath ///.),/)
|
---|
32 | $(warning ///.: abspath="$(abspath ///.)")
|
---|
33 | endif
|
---|
34 |
|
---|
35 | ifneq ($(abspath /./),/)
|
---|
36 | $(warning /./: abspath="$(abspath /./)")
|
---|
37 | endif
|
---|
38 |
|
---|
39 | ifneq ($(abspath /.///),/)
|
---|
40 | $(warning /.///: abspath="$(abspath /.///)")
|
---|
41 | endif
|
---|
42 |
|
---|
43 | ifneq ($(abspath /..),/)
|
---|
44 | $(warning /..: abspath="$(abspath /..)")
|
---|
45 | endif
|
---|
46 |
|
---|
47 | ifneq ($(abspath ///..),/)
|
---|
48 | $(warning ///..: abspath="$(abspath ///..)")
|
---|
49 | endif
|
---|
50 |
|
---|
51 | ifneq ($(abspath /../),/)
|
---|
52 | $(warning /../: abspath="$(abspath /../)")
|
---|
53 | endif
|
---|
54 |
|
---|
55 | ifneq ($(abspath /..///),/)
|
---|
56 | $(warning /..///: abspath="$(abspath /..///)")
|
---|
57 | endif
|
---|
58 |
|
---|
59 |
|
---|
60 | ifneq ($(abspath /foo/bar/..),/foo)
|
---|
61 | $(warning /foo/bar/..: abspath="$(abspath /foo/bar/..)")
|
---|
62 | endif
|
---|
63 |
|
---|
64 | ifneq ($(abspath /foo/bar/../../../baz),/baz)
|
---|
65 | $(warning /foo/bar/../../../baz: abspath="$(abspath /foo/bar/../../../baz)")
|
---|
66 | endif
|
---|
67 |
|
---|
68 | ifneq ($(abspath /foo/bar/../ /..),/foo /)
|
---|
69 | $(warning /foo/bar/../ /..: abspath="$(abspath /foo/bar/../ /..)")
|
---|
70 | endif
|
---|
71 |
|
---|
72 |
|
---|
73 | .PHONY: all
|
---|
74 | all: ; @:
|
---|
75 | ',
|
---|
76 | '',
|
---|
77 | '');
|
---|
78 |
|
---|
79 |
|
---|
80 | # This tells the test driver that the perl test script executed properly.
|
---|
81 | 1;
|
---|