< prev index next >

test/make/TestMakeBase.gmk

Print this page




 165   $(error Expected: $(VARDEP_VALUE_FILE) - DependOnVariable: $(VARDEP_RETURN_VALUE))
 166 endif
 167 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
 168 ifneq ($(VARDEP_TEST_VAR2), $(VARDEP_FILE_CONTENTS))
 169   $(error Expected: $(VARDEP_TEST_VAR2) - DependOnVariable file contained: \
 170       $(VARDEP_FILE_CONTENTS))
 171 endif
 172 
 173 # Test with a variable value containing some problematic characters
 174 VARDEP_TEST_VAR3 := foo '""' "''" bar
 175 VARDEP_VALUE_FILE := $(call DependOnVariable, VARDEP_TEST_VAR3)
 176 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
 177 ifneq ($(VARDEP_TEST_VAR3), $(VARDEP_FILE_CONTENTS))
 178   $(error Expected: >$(VARDEP_TEST_VAR3)< - DependOnVariable file contained: \
 179       >$(VARDEP_FILE_CONTENTS)<)
 180 endif
 181 
 182 TEST_TARGETS += test-vardep
 183 
 184 ################################################################################


















 185 
 186 all: $(TEST_TARGETS)


 165   $(error Expected: $(VARDEP_VALUE_FILE) - DependOnVariable: $(VARDEP_RETURN_VALUE))
 166 endif
 167 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
 168 ifneq ($(VARDEP_TEST_VAR2), $(VARDEP_FILE_CONTENTS))
 169   $(error Expected: $(VARDEP_TEST_VAR2) - DependOnVariable file contained: \
 170       $(VARDEP_FILE_CONTENTS))
 171 endif
 172 
 173 # Test with a variable value containing some problematic characters
 174 VARDEP_TEST_VAR3 := foo '""' "''" bar
 175 VARDEP_VALUE_FILE := $(call DependOnVariable, VARDEP_TEST_VAR3)
 176 VARDEP_FILE_CONTENTS := $(shell $(CAT) $(VARDEP_VALUE_FILE))
 177 ifneq ($(VARDEP_TEST_VAR3), $(VARDEP_FILE_CONTENTS))
 178   $(error Expected: >$(VARDEP_TEST_VAR3)< - DependOnVariable file contained: \
 179       >$(VARDEP_FILE_CONTENTS)<)
 180 endif
 181 
 182 TEST_TARGETS += test-vardep
 183 
 184 ################################################################################
 185 # Test sequence
 186 
 187 ifneq ($(call sequence, 1, 1), 1)
 188   $(error Sequence 1, 1 should be "1", but was $(call sequence, 1, 1))
 189 endif
 190 
 191 ifneq ($(call sequence, 2, 3), 2 3)
 192   $(error Sequence 2, 3 should be "2 3", but was $(call sequence, 2, 3))
 193 endif
 194 
 195 ifneq ($(call sequence, 4, 9), 4 5 6 7 8 9)
 196   $(error Sequence 4, 9 should be "4 5 6 7 8 9", but was $(call sequence, 4, 9))
 197 endif
 198 
 199 ifneq ($(call sequence, 5, 15), 5 6 7 8 9 10 11 12 13 14 15)
 200   $(error Sequence 5, 15 should be "5 6 7 8 9 10 11 12 13 14 15", \
 201       but was $(call sequence, 5, 15))
 202 endif
 203 
 204 all: $(TEST_TARGETS)
< prev index next >