mirror of
https://github.com/mirror/make.git
synced 2025-01-10 20:30:20 +08:00
82 lines
1.1 KiB
Perl
82 lines
1.1 KiB
Perl
# -*-perl-*-
|
|
$description = "Test the abspath functions.";
|
|
|
|
$details = "";
|
|
|
|
run_make_test('
|
|
ifneq ($(realpath $(abspath .)),$(CURDIR))
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(realpath $(abspath ./)),$(CURDIR))
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(realpath $(abspath .///)),$(CURDIR))
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath ///),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /.),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath ///.),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /./),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /.///),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /..),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath ///..),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /../),/)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /..///),/)
|
|
$(error )
|
|
endif
|
|
|
|
|
|
ifneq ($(abspath /foo/bar/..),/foo)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /foo/bar/../../../baz),/baz)
|
|
$(error )
|
|
endif
|
|
|
|
ifneq ($(abspath /foo/bar/../ /..),/foo /)
|
|
$(error )
|
|
endif
|
|
|
|
|
|
.PHONY: all
|
|
all: ; @:
|
|
',
|
|
'',
|
|
'');
|
|
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
1;
|