fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
81 stars 11 forks source link

1 test fails: Illegal byte sequence #60

Open yurivict opened 1 year ago

yurivict commented 1 year ago
cd /usr/ports/audio/opustags/work/.build/t && prove /usr/ports/audio/opustags/work/.build/t /usr/ports/audio/opustags/work/opustags-1.8.0/t
/usr/ports/audio/opustags/work/.build/t/base64.t ............ ok
/usr/ports/audio/opustags/work/.build/t/cli.t ............... ok
/usr/ports/audio/opustags/work/.build/t/ogg.t ............... ok
/usr/ports/audio/opustags/work/.build/t/opus.t .............. ok
# unexpected error: Illegal byte sequence.
/usr/ports/audio/opustags/work/.build/t/system.t ............ 
Failed 1/4 subtests 
Can't locate List/MoreUtils.pm in @INC (you may need to install the List::MoreUtils module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32) at /usr/ports/audio/opustags/work/opustags-1.8.0/t/opustags.t line 13.
BEGIN failed--compilation aborted at /usr/ports/audio/opustags/work/opustags-1.8.0/t/opustags.t line 13.
# Looks like your test exited with 2 before it could output anything.
/usr/ports/audio/opustags/work/opustags-1.8.0/t/opustags.t .. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 59/59 subtests 

Test Summary Report
-------------------
/usr/ports/audio/opustags/work/.build/t/system.t          (Wstat: 0 Tests: 4 Failed: 1)
  Failed test:  3
/usr/ports/audio/opustags/work/opustags-1.8.0/t/opustags.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 59 tests but ran 0.
Files=6, Tests=21,  1 wallclock secs ( 0.05 usr  0.03 sys +  0.20 cusr  0.02 csys =  0.30 CPU)
Result: FAIL
ninja: build stopped: subcommand failed.

Version: 1.8.0 clang-14 FreeBSD 13.1

fmang commented 1 year ago

Thanks for the report.

Regarding the Illegal byte sequence error, is your system encoding UTF-8? If it is, could you apply the following patch and test again:

diff --git a/t/system.cc b/t/system.cc
index c5fb89b..134e4c4 100644
--- a/t/system.cc
+++ b/t/system.cc
@@ -3,2 +3,3 @@

+#include <locale.h>
 #include <string.h>
@@ -50,2 +51,3 @@ void check_converter()
 {
+       setlocale(LC_ALL, "");
        is(ot::decode_utf8(ot::encode_utf8("Éphémère")), "Éphémère", "decode_utf8 reverts encode_utf8");

The error about List/MoreUtils.pm is a missing dependency error. You need to install https://metacpan.org/dist/List-MoreUtils.

fmang commented 1 year ago

Closing for inactivity.

yurivict commented 6 months ago

Hi @fmang ,

Sorry for the delay.

I see that in 1.10.0 you've already applied the above patch.

However, the "Illegal byte sequence" error is still present in 1.10.0

Thanks, Yuri

fmang commented 6 months ago

Well, then I am out of clues. I am reopening this issue in case someone more familiar with FreeBSD wishes to solve it.