< prev index next >

test/make/TestMakeBase.gmk

Print this page

        

*** 262,267 **** --- 262,344 ---- $(eval $(call assert-equals, \ $(call PathList, $(call PathList, $(PATHLIST_INPUT))), \ $(call PathList, $(PATHLIST_INPUT)), \ PathList call not safe for calling twice)) + ################################################################################ + # Test FindCommonPathPrefix + + $(eval $(call assert-equals, \ + $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar/banan), \ + /foo/bar, \ + FindCommonPathPrefix, \ + )) + + $(eval $(call assert-equals, \ + $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar), \ + /foo/bar, \ + FindCommonPathPrefix, \ + )) + + $(eval $(call assert-equals, \ + $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar/), \ + /foo/bar, \ + FindCommonPathPrefix, \ + )) + + $(eval $(call assert-equals, \ + $(call FindCommonPathPrefix, foo/bar/baz, foo/bar/banan), \ + foo/bar, \ + FindCommonPathPrefix, \ + )) + + $(eval $(call assert-equals, \ + $(call FindCommonPathPrefix, foo/bar/baz, /foo/bar/banan), \ + , \ + FindCommonPathPrefix, \ + )) + + ################################################################################ + # DirToDotDot + + $(eval $(call assert-equals, \ + $(call DirToDotDot, foo/bar/baz/), \ + ../../.., \ + DirToDotDot, \ + )) + + $(eval $(call assert-equals, \ + $(call DirToDotDot, foo/bar), \ + ../.., \ + DirToDotDot, \ + )) + + $(eval $(call assert-equals, \ + $(call DirToDotDot, /foo), \ + .., \ + DirToDotDot, \ + )) + + ################################################################################ + # RelativePath + + $(eval $(call assert-equals, \ + $(call RelativePath, foo/bar/baz, foo/bar/banan), \ + ../baz, \ + RelativePath, \ + )) + + $(eval $(call assert-equals, \ + $(call RelativePath, foo/bar/baz/banan/kung, foo/bar/banan/kung), \ + ../../baz/banan/kung, \ + RelativePath, \ + )) + + $(eval $(call assert-equals, \ + $(call RelativePath, /foo/bar/baz/banan/kung, /foo/bar/banan/kung/), \ + ../../baz/banan/kung, \ + RelativePath, \ + )) + + ################################################################################ + all: $(TEST_TARGETS)
< prev index next >