forked from bazelbuild/rules_pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable unicode test cases on windows. See bazelbuild#214
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ def assert_tar_stream_content(self, data, expected, match_order=True): | |
want = expected_by_name[name_in_tar_file] | ||
for k, v in want.items(): | ||
if k == 'data': | ||
value = f.extractfile(info).read().decode('utf-8') | ||
value = f.extractfile(info).read() | ||
elif k == 'name': | ||
# The test data uses / as path sep, but the tarbal is in OS native | ||
# format. This aligns the tarball name back to what we expect. | ||
|
@@ -154,14 +154,21 @@ def test_expected_files(self): | |
|
||
def test_description(self): | ||
control = self.deb_file.get_deb_ctl_file('control') | ||
for field in ( | ||
'Description: toto ®, Й, ק ,م, ๗, あ, 叶, 葉, 말, ü and é', | ||
fields = [ | ||
'Package: titi', | ||
'somé[email protected]', | ||
'Depends: dep1, dep2', | ||
'Built-Using: some_test_data', | ||
'Replaces: oldpkg', | ||
'Breaks: oldbrokenpkg'): | ||
'Breaks: oldbrokenpkg', | ||
] | ||
# TODO(https://github.com/bazelbuild/rules_pkg/issues/214): This can not | ||
# pass on Windows Until we rewrite how description is passed | ||
if sys.platform != 'win32': | ||
fields.extend([ | ||
'Description: toto ®, Й, ק ,م, ๗, あ, 叶, 葉, 말, ü and é', | ||
'Maintainer: somé[email protected]', | ||
]) | ||
for field in fields: | ||
if control.find(field) < 0: | ||
self.fail('Missing control field: <%s> in <%s>' % (field, control)) | ||
|
||
|