File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed
Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -31,16 +31,27 @@ jobs:
3131 - name : ' [test] many variables'
3232 run : diff test/many-variables/result test/many-variables/expected
3333
34- - name : ' [run] many variables ( messy whitespace) '
34+ - name : ' [run] many variables declared with messy whitespace'
3535 uses : ./
3636 with :
3737 template : test/many-variables/template
3838 output_file : test/many-variables/result
3939 variables : |
40- foo=bar
41- baz=cux
40+ foo=bar
41+ baz=cux
4242
4343
4444
45- - name : ' [test] many variables (messy whitespace)'
46- run : diff test/many-variables/result test/many-variables/expected
45+ - name : ' [test] many variables declared with messy whitespace'
46+ run : diff test/many-variables/result test/many-variables/expected
47+
48+ - name : ' [run] many variables with messy whitespace'
49+ uses : ./
50+ with :
51+ template : test/whitespace/template
52+ output_file : test/whitespace/result
53+ variables : |
54+ foo=this variable has whitespace but it only takes one line
55+ bar= \nthis\nvariable\nhas\nmany\n \nlines\n and trailing whitespace
56+ - name : ' [test] many variables with messy whitespace'
57+ run : diff test/whitespace/result test/whitespace/expected
Original file line number Diff line number Diff line change 77params = [os .environ ['INPUT_TEMPLATE' ]]
88
99for variable in os .environ .get ('INPUT_VARIABLES' , '' ).split ('\n ' ):
10- clean_variable = variable .strip ()
10+ clean_variable = bytes ( variable .strip (), 'utf-8' ). decode ( 'unicode_escape' )
1111 if clean_variable != '' :
1212 params .extend (['-D' , clean_variable ])
1313
Original file line number Diff line number Diff line change 1+
2+ this variable has whitespace but it only takes one line
3+
4+ this
5+ variable
6+ has
7+ many
8+
9+ lines
10+ and trailing whitespace
Original file line number Diff line number Diff line change 1+
2+ {{ foo }}
3+ {{ bar }}
You can’t perform that action at this time.
0 commit comments