File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 26
26
]
27
27
)
28
28
29
- # Notice the extra indentation in the library strings. The action doesn't
30
- # modify the app's strings content indentation, but it applies its own
31
- # standard to the values read from the given library strings
32
29
expected = <<~XML
33
30
<string name="a_string">test from app</string>
34
- <string name="a_lib1_string">test from lib 1</string>
35
- <string name="a_lib2_string">test from lib 2</string>
31
+ <string name="a_lib1_string">test from lib 1</string>
32
+ <string name="a_lib2_string">test from lib 2</string>
36
33
XML
37
34
expect ( File . read ( app_strings_path ) ) . to eq ( android_xml_with_content ( expected ) )
38
35
end
@@ -43,7 +40,10 @@ def android_xml_with_content(content)
43
40
# I couldn't find a way to interpolate a multiline string preserving its
44
41
# indentation in the heredoc below, so I hacked the following transformation
45
42
# of the input that adds the desired indentation to all lines.
46
- indented_content = content . chomp . lines . map { |l | " #{ l } " } . join
43
+ #
44
+ # The desired indentation is 4 spaces to stay aligned with the production
45
+ # code applies when merging the XMLs.
46
+ indented_content = content . chomp . lines . map { |l | " #{ l } " } . join
47
47
48
48
return <<~XML
49
49
<?xml version="1.0" encoding="UTF-8"?>
You can’t perform that action at this time.
0 commit comments