< prev index next >

test/make/TestMakeBase.gmk

Print this page




 247 
 248 ifneq ($(call sequence, 4, 9), 4 5 6 7 8 9)
 249   $(error Sequence 4, 9 should be "4 5 6 7 8 9", but was $(call sequence, 4, 9))
 250 endif
 251 
 252 ifneq ($(call sequence, 5, 15), 5 6 7 8 9 10 11 12 13 14 15)
 253   $(error Sequence 5, 15 should be "5 6 7 8 9 10 11 12 13 14 15", \
 254       but was $(call sequence, 5, 15))
 255 endif
 256 
 257 ################################################################################
 258 # Test that PathList is safe when called multiple nested times.
 259 
 260 PATHLIST_INPUT := foo bar baz
 261 
 262 $(eval $(call assert-equals, \
 263     $(call PathList, $(call PathList, $(PATHLIST_INPUT))), \
 264     $(call PathList, $(PATHLIST_INPUT)), \
 265     PathList call not safe for calling twice))
 266 













































































 267 all: $(TEST_TARGETS)


 247 
 248 ifneq ($(call sequence, 4, 9), 4 5 6 7 8 9)
 249   $(error Sequence 4, 9 should be "4 5 6 7 8 9", but was $(call sequence, 4, 9))
 250 endif
 251 
 252 ifneq ($(call sequence, 5, 15), 5 6 7 8 9 10 11 12 13 14 15)
 253   $(error Sequence 5, 15 should be "5 6 7 8 9 10 11 12 13 14 15", \
 254       but was $(call sequence, 5, 15))
 255 endif
 256 
 257 ################################################################################
 258 # Test that PathList is safe when called multiple nested times.
 259 
 260 PATHLIST_INPUT := foo bar baz
 261 
 262 $(eval $(call assert-equals, \
 263     $(call PathList, $(call PathList, $(PATHLIST_INPUT))), \
 264     $(call PathList, $(PATHLIST_INPUT)), \
 265     PathList call not safe for calling twice))
 266 
 267 ################################################################################
 268 # Test FindCommonPathPrefix
 269 
 270 $(eval $(call assert-equals, \
 271     $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar/banan), \
 272     /foo/bar, \
 273     FindCommonPathPrefix, \
 274 ))
 275 
 276 $(eval $(call assert-equals, \
 277     $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar), \
 278     /foo/bar, \
 279     FindCommonPathPrefix, \
 280 ))
 281 
 282 $(eval $(call assert-equals, \
 283     $(call FindCommonPathPrefix, /foo/bar/baz, /foo/bar/), \
 284     /foo/bar, \
 285     FindCommonPathPrefix, \
 286 ))
 287 
 288 $(eval $(call assert-equals, \
 289     $(call FindCommonPathPrefix, foo/bar/baz, foo/bar/banan), \
 290     foo/bar, \
 291     FindCommonPathPrefix, \
 292 ))
 293 
 294 $(eval $(call assert-equals, \
 295     $(call FindCommonPathPrefix, foo/bar/baz, /foo/bar/banan), \
 296     , \
 297     FindCommonPathPrefix, \
 298 ))
 299 
 300 ################################################################################
 301 # DirToDotDot
 302 
 303 $(eval $(call assert-equals, \
 304     $(call DirToDotDot, foo/bar/baz/), \
 305     ../../.., \
 306     DirToDotDot, \
 307 ))
 308 
 309 $(eval $(call assert-equals, \
 310     $(call DirToDotDot, foo/bar), \
 311     ../.., \
 312     DirToDotDot, \
 313 ))
 314 
 315 $(eval $(call assert-equals, \
 316     $(call DirToDotDot, /foo), \
 317     .., \
 318     DirToDotDot, \
 319 ))
 320 
 321 ################################################################################
 322 # RelativePath
 323 
 324 $(eval $(call assert-equals, \
 325     $(call RelativePath, foo/bar/baz, foo/bar/banan), \
 326     ../baz, \
 327     RelativePath, \
 328 ))
 329 
 330 $(eval $(call assert-equals, \
 331     $(call RelativePath, foo/bar/baz/banan/kung, foo/bar/banan/kung), \
 332     ../../baz/banan/kung, \
 333     RelativePath, \
 334 ))
 335 
 336 $(eval $(call assert-equals, \
 337     $(call RelativePath, /foo/bar/baz/banan/kung, /foo/bar/banan/kung/), \
 338     ../../baz/banan/kung, \
 339     RelativePath, \
 340 ))
 341 
 342 ################################################################################
 343 
 344 all: $(TEST_TARGETS)
< prev index next >