X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02git_Repository.t;h=c8aae141b0e75bd3f2561db5f626fbb9e0ec213c;hb=b6e0be6c0a8f9e638f354a4c7d3f8af9c964253f;hp=885a490413b3c348107cdea3ca45a9dc9587155e;hpb=09717a40ef5a5d43158701e91ead9ac7934880db;p=catagits%2FGitalist.git diff --git a/t/02git_Repository.t b/t/02git_Repository.t index 885a490..c8aae14 100644 --- a/t/02git_Repository.t +++ b/t/02git_Repository.t @@ -16,9 +16,9 @@ use Data::Dumper; BEGIN { # Mocking to allow testing regardless of the user's locale - require I18N::Langinfo; + require I18N::Langinfo if $^O ne 'MSWin32'; no warnings 'redefine'; - *I18N::Langinfo::langinfo = sub($) { + *I18N::Langinfo::langinfo = sub(_) { return "UTF-8" if $_[0] == I18N::Langinfo::CODESET(); }; *CORE::GLOBAL::getpwuid = sub { @@ -79,6 +79,8 @@ like($proj->head_hash('HEAD'), qr/^([0-9a-fA-F]{40})$/, 'head_hash'); isa_ok($tree[0], 'Gitalist::Git::Object', 'tree element 0'); } +$proj->{owner} = decode_utf8("T\x{c3}\x{a9}st") if $^O eq 'MSWin32'; + my $owner = $proj->owner; is_flagged_utf8($owner, "Owner name is flagged as utf8"); is_sane_utf8($owner, "Owner name is not double-encoded");