Re: test-mhfixmsg and test-binary fails on debian stable
Philipp wrote: > [2023-08-26 17:39] David Levine > > Philipp wrote: > > > > > [2023-08-26 15:28] David Levine > > > > > > > > The NUL byte is output as \x00: > > > > > > I found the problem: The build in printf of dash don't write a NUL. > > > Using printf from path to generate the test and expected file works as > > > expected. > > > > Thank you! I'll update the test. > > An other hint for this test. Posix printf specifies an octal escape > sequences[0]. Replacing the '\x00' with '\000' fixes the test. Yes, much better. I'll fix that test and test/post/test-post-basic. Thank you! David > [0] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
Re: test-mhfixmsg and test-binary fails on debian stable
[2023-08-26 17:39] David Levine > Philipp wrote: > > > [2023-08-26 15:28] David Levine > > > > > > The NUL byte is output as \x00: > > > > I found the problem: The build in printf of dash don't write a NUL. > > Using printf from path to generate the test and expected file works as > > expected. > > Thank you! I'll update the test. An other hint for this test. Posix printf specifies an octal escape sequences[0]. Replacing the '\x00' with '\000' fixes the test. Philipp [0] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
Re: test-mhfixmsg and test-binary fails on debian stable
Philipp wrote: > [2023-08-26 15:28] David Levine > > > > The NUL byte is output as \x00: > > I found the problem: The build in printf of dash don't write a NUL. > Using printf from path to generate the test and expected file works as > expected. Thank you! I'll update the test. David
Re: test-mhfixmsg and test-binary fails on debian stable
[2023-08-26 15:28] David Levine > Philipp wrote: > > > This test now passes. > > Thank you for reporting the test failure and for confirming the fix. > > > Here you go: > > $ od -ax /tmp/nmh/test/testdir/test-binary302898.actua > > Thanks. > > The NUL byte is output as \x00: I found the problem: The build in printf of dash don't write a NUL. Using printf from path to generate the test and expected file works as expected. Philipp > > 260 y t e : sp \ x 0 0 . nl > >74793a655c2030782e30000a > > The content in the message is identified as binary so I'm not sure why. > For me, it is output as NUL: > > 260 y t e : sp nul . nl >74793a6500200a2e > > David >
Re: test-mhfixmsg and test-binary fails on debian stable
Philipp wrote: > This test now passes. Thank you for reporting the test failure and for confirming the fix. > Here you go: > $ od -ax /tmp/nmh/test/testdir/test-binary302898.actua Thanks. The NUL byte is output as \x00: > 260 y t e : sp \ x 0 0 . nl >74793a655c2030782e30000a The content in the message is identified as binary so I'm not sure why. For me, it is output as NUL: 260 y t e : sp nul . nl 74793a6500200a2e David
Re: test-mhfixmsg and test-binary fails on debian stable
[2023-08-26 14:33] David Levine > Philipp wrote: > > > LANG=en_US.UTF-8 > > LC_ALL= > > > I have "#define HAVE_ICONV 1" in config.h. I just run autogen.sh and > > configure without any arguments. > > Thanks, those match what I use. > > I just committed a fix to test-mhfixmsg. Different html renderers > produced different output. I replace a non-breakable space with a > space so the output is now the same from w3m, lynx, and elinks. This test now passes. > I don't know why your test_binary would count 26 bytes instead of 23. > Can you post or send me your /tmp/nmh/test/testdir/test-binary.actual > file? Or better, run od -ax on it and post that? Here you go: $ od -ax /tmp/nmh/test/testdir/test-binary302898.actua 000 [ sp M e s s a g e sp i n b o x : 205b654d7373676120656e696f623a78 020 1 1 sp ] nl T o : sp sp sp sp sp sp r e 31315d20540a3a6f2020202020206572 040 c i p i e n t @ e x a m p l e . 696369706e65407478656d616c702e65 060 e d u nl F r o m : sp sp sp sp s e n 64650a7572466d6f203a202073206e65 100 d e r @ e x a m p l e . e d u nl 6564407278656d616c702e6564650a75 120 S u b j e c t : sp t e s t sp b i 75536a6263653a747420736520746962 140 n a r y sp c o n t e n t nl nl M I 616e797263206e6f6574746e0a0a494d 160 M E - V e r s i o n : sp 1 . 0 nl 454d562d726569736e6f203a2e310a30 200 nl [ sp p a r t sp sp - sp t e x t / 5b0a7020726120742d20742078652f74 220 p l a i n sp - sp sp sp 2 6 B sp sp ] 6c706961206e202d2020363220425d20 240 nl H e r e ' s sp a sp n u l l sp b 480a7265276520732061756e6c6c6220 260 y t e : sp \ x 0 0 . nl 74793a655c2030782e30000a 273 Philipp > > David >
Re: test-mhfixmsg and test-binary fails on debian stable
Philipp wrote: > LANG=en_US.UTF-8 > LC_ALL= > I have "#define HAVE_ICONV 1" in config.h. I just run autogen.sh and > configure without any arguments. Thanks, those match what I use. I just committed a fix to test-mhfixmsg. Different html renderers produced different output. I replace a non-breakable space with a space so the output is now the same from w3m, lynx, and elinks. I don't know why your test_binary would count 26 bytes instead of 23. Can you post or send me your /tmp/nmh/test/testdir/test-binary.actual file? Or better, run od -ax on it and post that? David
Re: test-mhfixmsg and test-binary fails on debian stable
[2023-08-26 08:44] David Levine > Philipp wrote: > > > I have noticed that two tests (test-mhfixmsg and test-binary) fail > > on my computer. I use debian stable and configure outputs folloing: > > What is your locale? $ locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= > Do your nmh build use iconv? I have "#define HAVE_ICONV 1" in config.h. I just run autogen.sh and configure without any arguments. Philipp > > David >
Re: test-mhfixmsg and test-binary fails on debian stable
Philipp wrote: > I have noticed that two tests (test-mhfixmsg and test-binary) fail > on my computer. I use debian stable and configure outputs folloing: What is your locale? Do your nmh build use iconv? David
test-mhfixmsg and test-binary fails on debian stable
Hi I have noticed that two tests (test-mhfixmsg and test-binary) fail on my computer. I use debian stable and configure outputs folloing: nmh configuration - nmh version: 1.8+dev host os: x86_64-pc-linux-gnu compiler : cc compiler flags : -g -O2 -Wall -Wextra linker flags : preprocessor flags : -D_GNU_SOURCE source code location : . binary install path: /usr/local/nmh/bin libexec install path : /usr/local/nmh/libexec/nmh config files install path : /usr/local/nmh/etc/nmh man page install path : /usr/local/nmh/share/man docs install path : /usr/local/nmh/share/doc/nmh RPM build root : ./RPM backup prefix : , transport system : smtp spool default locking type : fcntl default smtp server: localhost SASL support : no TLS support: yes OAuth support : no cc is gcc 12.2.0 output test-mhfixmsg: *** /tmp/nmh/test/testdir/test-mhfixmsg83068.expected 2023-08-26 09:48:51.891484073 + --- /tmp/nmh/test/testdir/test-mhfixmsg83068.actual 2023-08-26 09:48:51.923483955 + *** *** 4,22 From: Subject: body requires binary encoding Content-Type: multipart/alternative; boundary="=_nmh-multipart" --=_nmh-multipart Content-Type: text/plain; charset="ISO-8859-1" ! Content-Transfer-Encoding: 7bit ! Mile $0.00 ! Time$78.71 ! State Tax$5.90 ! Vehicle License Fee $1.84 ! State Txn Tax$6.00 --=_nmh-multipart Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable - --- 4,22 From: Subject: body requires binary encoding Content-Type: multipart/alternative; boundary="=_nmh-multipart" + Content-Transfer-Encoding: 8bit --=_nmh-multipart Content-Type: text/plain; charset="ISO-8859-1" ! Content-Transfer-Encoding: 8bit ! Mile $0.00 ! Time $78.71 ! State Tax $5.90 ! Vehicle License Fee $1.84 ! State Txn Tax $6.00 --=_nmh-multipart Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable ./test/mhfixmsg/test-mhfixmsg: test failed, outputs are in /tmp/nmh/test/testdir/test-mhfixmsg83068.expected and /tmp/nmh/test/testdir/test-mhfixmsg83068.actual. first named test failure: -reformat succeeds when decode of binary text fails output test-binary: *** /tmp/nmh/test/testdir/test-binary85135.expected Sat Aug 26 09:48:54 2023 --- /tmp/nmh/test/testdir/test-binary85135.actual Sat Aug 26 09:48:54 2023 *** *** 5,9 MIME-Version: 1.0 ! [ part - text/plain - 23B ] Here's a null byte: \x00. --- 5,9 MIME-Version: 1.0 ! [ part - text/plain - 26B ] Here's a null byte: \x00. ./test/mhshow/test-binary: test failed, outputs are in /tmp/nmh/test/testdir/test-binary85135.expected and /tmp/nmh/test/testdir/test-binary85135.actual. Philipp