"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "unit-tests/dollar.mk" between
bmake-20201101.tar.gz and bmake-20201117.tar.gz

About: bmake a BSD make tool (derived from NetBSD’s make).

dollar.mk  (bmake-20201101):dollar.mk  (bmake-20201117)
# $NetBSD: dollar.mk,v 1.3 2020/05/17 09:37:48 rillig Exp $ # $NetBSD: dollar.mk,v 1.4 2020/11/03 18:21:36 rillig Exp $
# #
# Test the various places where a dollar character can appear and # Test the various places where a dollar sign can appear and
# see what happens. There are lots of surprises here. # see what happens. There are lots of surprises here.
# #
LIST= plain 'single' "double" 'mix'"ed" back\ slashed LIST= plain 'single' "double" 'mix'"ed" back\ slashed
WORD= word WORD= word
DOLLAR1= $ DOLLAR1= $
DOLLAR2= $$ DOLLAR2= $$
DOLLAR4= $$$$ DOLLAR4= $$$$
skipping to change at line 33 skipping to change at line 33
# The trailing dollar in the '1 dollar literal eol' test case accesses # The trailing dollar in the '1 dollar literal eol' test case accesses
# the empty variable instead, which is always guaranteed to be empty. # the empty variable instead, which is always guaranteed to be empty.
${:U }= space-var-value ${:U }= space-var-value
${:U${.newline}}= newline-var-value ${:U${.newline}}= newline-var-value
# But this one is accessed. # But this one is accessed.
${:U'}= single-quote-var-value' ${:U'}= single-quote-var-value'
all: all:
$H 'Printing dollar from literals and variables' $H 'Printing dollar from literals and variables'
$C 'To survive the parser, a dollar character must be doubled.' $C 'To survive the parser, a dollar sign must be doubled.'
$T '1 dollar literal' '$' $T '1 dollar literal' '$'
$T '1 dollar literal eol' ''$ $T '1 dollar literal eol' ''$
$T '2 dollar literal' '$$' $T '2 dollar literal' '$$'
$T '4 dollar literal' '$$$$' $T '4 dollar literal' '$$$$'
$C 'Some hungry part of make eats all the dollars after a :U modifier.' $C 'Some hungry part of make eats all the dollars after a :U modifier.'
$T '1 dollar default' ''${:U$:Q} $T '1 dollar default' ''${:U$:Q}
$T '2 dollar default' ''${:U$$:Q} $T '2 dollar default' ''${:U$$:Q}
$T '4 dollar default' ''${:U$$$$:Q} $T '4 dollar default' ''${:U$$$$:Q}
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)