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:
31
31
- name : ' [test] many variables'
32
32
run : diff test/many-variables/result test/many-variables/expected
33
33
34
- - name : ' [run] many variables ( messy whitespace) '
34
+ - name : ' [run] many variables declared with messy whitespace'
35
35
uses : ./
36
36
with :
37
37
template : test/many-variables/template
38
38
output_file : test/many-variables/result
39
39
variables : |
40
- foo=bar
41
- baz=cux
40
+ foo=bar
41
+ baz=cux
42
42
43
43
44
44
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 7
7
params = [os .environ ['INPUT_TEMPLATE' ]]
8
8
9
9
for 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' )
11
11
if clean_variable != '' :
12
12
params .extend (['-D' , clean_variable ])
13
13
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