1 # SPDX-License-Identifier: MIT
3 # Copyright The SCons Foundation
5 DefaultEnvironment(tools
=[])
6 env
= Environment(tools
=['textfile'])
7 data0
= ['Goethe', 'Schiller']
8 data
= ['lalala', 42, data0
, 'tanteratei',
9 '×'] # <-- this is unicode /xd7 symbol
11 env
.Textfile('foo1', data
)
12 env
.Textfile('foo2', data
, LINESEPARATOR
='|*')
13 env
.Textfile('foo1a.txt', data
+ [''])
14 env
.Textfile('foo2a.txt', data
+ [''], LINESEPARATOR
='|*')
16 issue_4021_textfile
= r
'<HintPath>..\..\..\@HINT_PATH@\Datalogics.PDFL.dll</HintPath>'
20 SUBST_DICT
={'@HINT_PATH@': r
'NETCore\bin\$$(Platform)\$$(Configuration)'},
22 # recreate the list with the data wrapped in Value()
23 data0
= list(map(Value
, data0
))
24 data
= list(map(Value
, data
))
27 env
.Substfile('bar1', data
)
28 env
.Substfile('bar2', data
, LINESEPARATOR
='|*')
29 data
.append(Value(''))
30 env
.Substfile('bar1a.txt', data
)
31 env
.Substfile('bar2a.txt', data
, LINESEPARATOR
='|*')