Home | History | Annotate | Download | only in unit-tests

Lines Matching refs:newline

1 # $NetBSD: varname-dot-newline.mk,v 1.7 2024/06/15 22:06:31 rillig Exp $
3 # Tests for the special .newline variable, which contains a single newline
8 # > After all macro expansion is complete, when an escaped <newline> is
10 # > shall contain the <backslash>, the <newline>, and the next line, except
14 # The above quote assumes that each resulting <newline> character has a "next
15 # line", but that's not how the .newline variable works.
16 BACKSLASH_NEWLINE:= \${.newline}
19 # Check that .newline is read-only
21 NEWLINE:= ${.newline}
26 .newline?= fallback
27 # expect+1: Cannot overwrite ".newline" as it is read-only
28 .newline= overwritten
29 # expect+1: Cannot append to ".newline" as it is read-only
30 .newline+= appended
31 # expect+1: Cannot delete ".newline" as it is read-only
32 .undef .newline
35 .if ${.newline} != ${NEWLINE}
36 . error The .newline variable can be overwritten. It should be read-only.
41 @echo 'first${.newline}second'
42 @echo 'backslash newline: <${BACKSLASH_NEWLINE}>'