[1.1.9] sas7bcat regression on big-endian architectures
test_readstat in ReadStat 1.1.9 fails on big-endian architectures for sas7bcat; I noticed this issue when uploading 1.1.9 to Debian unstable (see the build logs of the various big-endian architectures: [1][2][3][4][5]). The failed test log is:
FAIL: test_readstat
===================
Writing file buffer to /tmp/test_readstat.sas7bcat
Test "" failed: Value labels count
* Format: sas7bcat (0x100000)
* Expected: 2.000000 (double)
* Received: 0.000000 (double)
FAIL test_readstat (exit status: 1)
Bisecting on an s390x Debian porterbox lead me to commit b8e708d14d5e11abca74822a701ec5e51b61ce14 (PR #293). Unfortunately I do not know the file format to debug what is going on.
[1] https://buildd.debian.org/status/fetch.php?pkg=readstat&arch=s390x&ver=1.1.9-1&stamp=1686814711&raw=0 [2] https://buildd.debian.org/status/fetch.php?pkg=readstat&arch=hppa&ver=1.1.9-1&stamp=1686815144&raw=0 [3] https://buildd.debian.org/status/fetch.php?pkg=readstat&arch=powerpc&ver=1.1.9-1&stamp=1686814802&raw=0 [4] https://buildd.debian.org/status/fetch.php?pkg=readstat&arch=ppc64&ver=1.1.9-1&stamp=1686814738&raw=0 [5] https://buildd.debian.org/status/fetch.php?pkg=readstat&arch=sparc64&ver=1.1.9-1&stamp=1686816438&raw=0
CC @gorcha
I think I see the issue; this only affects the test suite, will merge a fix soon.
Hm I just tried on a s390x Debian porterbox at commit 0034c8ee693563cbecae8fa8a24d3e8d5dcc6ab1, and the test still fails in the same way as mentioned in my previous comment.
Try https://github.com/WizardMac/ReadStat/commit/29aac3db79a5da20d1d1dcbb54a587c5ba51e7b3
If that doesn't work I'll see if I can emulate big-endian somehow