| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 # This file is part of the Adblock Plus web scripts, | 1 # This file is part of the Adblock Plus web scripts, |
| 2 # Copyright (C) 2006-present eyeo GmbH | 2 # Copyright (C) 2006-present eyeo GmbH |
| 3 # | 3 # |
| 4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
| 5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
| 6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
| 7 # | 7 # |
| 8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 def test_write_data(toydir, path): | 217 def test_write_data(toydir, path): |
| 218 """Test if writing data to files works as expected.""" | 218 """Test if writing data to files works as expected.""" |
| 219 data = bytes(json.dumps({'a': 'b'})) | 219 data = bytes(json.dumps({'a': 'b'})) |
| 220 | 220 |
| 221 utils.write_to_file(data, str(toydir.join(path))) | 221 utils.write_to_file(data, str(toydir.join(path))) |
| 222 | 222 |
| 223 assert toydir.join(path).read('rb') == data | 223 assert toydir.join(path).read('rb') == data |
| 224 | 224 |
| 225 | 225 |
| 226 def test_extract_unicode_strings(temp_site): | 226 def test_extract_unicode_strings(temp_site): |
| 227 """Test correct extraction of unicode strings for translation. | 227 """Test correct extraction of unicode strings for translation.""" |
| 228 | |
| 229 Testing for presence of "Ͷ" - \u0376. | |
|
Vasily Kuznetsov
2018/10/12 09:39:51
Doesn't this line cause an error for you? I get:
Tudor Avram
2018/10/12 10:37:02
Huh, ok. It didn't give me an error, but well, I
| |
| 230 """ | |
| 231 with FileSource(temp_site) as fs: | 228 with FileSource(temp_site) as fs: |
| 232 strings = utils.extract_strings(fs) | 229 strings = utils.extract_strings(fs) |
| 233 | 230 |
| 234 assert '\u0376' in strings['translate-unicode']['simple']['message'] | 231 assert '\u0376' in strings['translate-unicode']['simple']['message'] |
| LEFT | RIGHT |