Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions spec/android_prune_orphaned_translations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ def write_file(path, content)
end
end

it 'leaves car UI mode qualifier directories untouched' do
Dir.mktmpdir do |dir|
res_dir = File.join(dir, 'res')
write_file(File.join(res_dir, 'values', 'strings.xml'), default_strings)
car_file = File.join(res_dir, 'values-car', 'strings.xml')
car_content = <<~XML
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="car_only">Car</string>
</resources>
XML
write_file(car_file, car_content)

pruned = run_described_fastlane_action(res_dir: res_dir)

expect(pruned).to eq(0)
expect(File.read(car_file)).to eq(car_content)
end
end

it 'treats keys from `additional_source_strings_paths` as valid (flavor overlay case)' do
Dir.mktmpdir do |dir|
res_dir = File.join(dir, 'res')
Expand Down