diff --git a/spec/android_prune_orphaned_translations_spec.rb b/spec/android_prune_orphaned_translations_spec.rb index e51de2b21..3ae43e5b2 100644 --- a/spec/android_prune_orphaned_translations_spec.rb +++ b/spec/android_prune_orphaned_translations_spec.rb @@ -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 + + + Car + + 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')