Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests/ portable #8

wants to merge 1 commit into from

Make tests/ portable #8

wants to merge 1 commit into from


Copy link

@a4lg a4lg commented Jul 21, 2014

I found some tests fail on some locales (I mainly use LANG=en_US.UTF-8).

The issue is, the way to generate test vector is not portable enough. For instance, on the GNU/Linux environment which LANG=en_US.UTF-8, awk 'BEGIN{printf("%c",0x80)}' prints UTF-8 representation of Unicode codepoint U+0080 (0xc2 0x80) instead of single byte 0x80.

I think the only way to resolve the issue is embed test vectors in the directory as this commit does (maybe you could modify locale-related environment variables but I believe this is the most portable solution).

This script uses awk to generate binary files but this is not portable
because `printf' prints multibyte characters on some locales
(e.g. en_US.UTF-8).

This commit resolves this issue by embedding test data directly.
Copy link

rhash commented Jul 22, 2014

Thank you for the fix!

I've incorporated it into master with small change - the 512K test has been removed to decrease a bit the sources tarball size.

@a4lg a4lg closed this Jul 23, 2014
@a4lg a4lg deleted the fix/portable-tests branch Jul 23, 2014
@rhash rhash added the done The issue is fixed/applied/implemented label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
done The issue is fixed/applied/implemented
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants