guile-email discussion
 help / color / mirror / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: guile-email@systemreboot.net
Subject: Fix tests with Guile 3.0.7
Date: Wed, 29 Sep 2021 12:53:02 +0000	[thread overview]
Message-ID: <87mtnv1r2p.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]


Hello,

This patch fixes the tests when building with Guile 3.0.7.

Thanks,

Mathieu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-email-Do-not-use-an-empty-bytevector-to-test-the-cha.patch --]
[-- Type: text/x-patch, Size: 1083 bytes --]

From c21fe0f0e28b80b606973d3e372e2bc8528c9766 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Wed, 29 Sep 2021 12:47:35 +0000
Subject: [PATCH 1/1] email: Do not use an empty bytevector to test the
 charset.

Using an empty bytevector no longer throws an exception since this Guile
commit: 5ea8c69e9153a970952bf6f0b32c4fad6a28e839.

* email/email.scm (post-process-content-transfer-encoding): Use a bytevector
containg the 'e' character to test the charset validity.
---
 email/email.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/email/email.scm b/email/email.scm
index 3f4e194..ac70463 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -832,7 +832,8 @@ values. The returned headers is a string and body is a bytevector."
   (define (valid-charset? charset)
     (catch #t
       (lambda ()
-        (bytevector->string (make-bytevector 0 0) charset)
+        ;; Try to convert a bytevector containg the 'e' character.
+        (bytevector->string (make-bytevector 1 48) charset)
         #t)
       (const #f)))
 
-- 
2.33.0


             reply	other threads:[~2021-09-29 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 12:53 Mathieu Othacehe [this message]
2021-10-01 19:58 ` Arun Isaac
2021-10-06  8:58   ` Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtnv1r2p.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=guile-email@systemreboot.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox