#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
test_igenstrings
----------------------------------

Tests for `igenstrings` module.
"""

import unittest
from codecs import open

from igenstrings import merger


class TestMergerIntegration(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_keep_existing_translated_strings(self):
        merger.merge_localized_strings('tests/objc', None)
        content = None
        with open('tests/objc/fr.lproj/Localizable.strings', encoding='utf16', mode='r') as fr_locale_file:
            content = fr_locale_file.read()
        self.assertIn('Bonjour', content)

@@ -191,24 +191,31 @@
 nstrings
+.merger
  import 
 merger%0A%0A
@@ -206,17 +206,17 @@
  import 
-m
+M
 erger%0A%0A%0A
@@ -382,32 +382,76 @@
 _strings(self):%0A
+        merger = Merger('tests/objc', None)%0A
         merger.m
@@ -473,34 +473,16 @@
 strings(
-'tests/objc', None
 )%0A      

Fix the merger tests