1# $NetBSD: varmod-unique.mk,v 1.5 2021/05/30 20:26:41 rillig Exp $ 2# 3# Tests for the :u variable modifier, which discards adjacent duplicate 4# words. 5 6.if ${:U1 2 1:u} != "1 2 1" 7. warning The :u modifier only merges _adjacent_ duplicate words. 8.endif 9 10.if ${:U1 2 2 3:u} != "1 2 3" 11. warning The :u modifier must merge adjacent duplicate words. 12.endif 13 14.if ${:U:u} != "" 15. warning The :u modifier must do nothing with an empty word list. 16.endif 17 18.if ${:U :u} != "" 19. warning The modifier ':u' must normalize the whitespace. 20.endif 21 22.if ${:Uword:u} != "word" 23. warning The :u modifier must do nothing with a single-element word list. 24.endif 25 26.if ${:U word :u} != "word" 27. warning The modifier ':u' must normalize the whitespace. 28.endif 29 30.if ${:U1 1 1 1 1 1 1 1:u} != "1" 31. warning The :u modifier must merge _all_ adjacent duplicate words. 32.endif 33 34.if ${:U 1 2 1 1 :u} != "1 2 1" 35. warning The :u modifier must normalize whitespace between the words. 36.endif 37 38.if ${:U1 1 1 1 2:u} != "1 2" 39. warning Duplicate words at the beginning must be merged. 40.endif 41 42.if ${:U1 2 2 2 2:u} != "1 2" 43. warning Duplicate words at the end must be merged. 44.endif 45 46all: 47 @:; 48