make/tests/scripts/functions/abspath
2004-11-30 19:51:24 +00:00

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;