From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#38628: [PATCH] gexp: Allow character literals in GEXP->SEXP. Date: Wed, 18 Dec 2019 23:06:21 +0100 Message-ID: <877e2tcmqq.fsf@devup.no> References: <87y2vdcp2b.fsf@devup.no> <20191215203513.27831-1-mbakke@fastmail.com> <878sncdjmu.fsf@gnu.org> <874ky0djjt.fsf@gnu.org> <87mubpcvdc.fsf@devup.no> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52429) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhTE-0001UY-0h for bug-guix@gnu.org; Wed, 18 Dec 2019 17:07:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhTC-00050j-VM for bug-guix@gnu.org; Wed, 18 Dec 2019 17:07:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38101) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhTC-00050a-S7 for bug-guix@gnu.org; Wed, 18 Dec 2019 17:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ihhTC-0004AY-NP for bug-guix@gnu.org; Wed, 18 Dec 2019 17:07:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87mubpcvdc.fsf@devup.no> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38628-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke writes: > Ludovic Court=C3=A8s writes: > >> Also it would be nice to add a tiny test close to the one that >> 24ab804ce11fe12ff49cd144a3d9c4bfcf55b41c added. > > Good idea. I came up with this: > > diff --git a/tests/gexp.scm b/tests/gexp.scm > index 84c16422c2..8b1596f66d 100644 > --- a/tests/gexp.scm > +++ b/tests/gexp.scm > @@ -886,6 +886,12 @@ > (run-with-store %store > (lower-gexp #~(foo #$+))))) >=20=20 > +(test-equal "lower-gexp, character literal" > + '(#\+) > + (lowered-gexp-sexp > + (run-with-store %store > + (lower-gexp #~(#\+))))) > + > (test-assertm "gexp->derivation #:references-graphs" > (mlet* %store-monad > ((one (text-file "one" (random-text))) > > WDYT? I ended up pushing this in ab7010af1f1077c056529769a53a380147c3933f, even though I suspect there is an easier test that could reveal this problem without involving the store, somewhere. Improvements welcome. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl36ot0ACgkQoqBt8qM6 VPo8rQf/aW7skmVCzWzSjvZbm/0kcnOr0U498EVAN1rzVO1KT5FtGHjzMzTJ7Byn 65vZSw8Jj7Uc9YdZ9F9+pOOeASOnk/uJvN6uZC6i3uBna9A2OzBJjUVjmlhP5Jvm LKTll2coyic3ZGMQv+J65IaJxYaLw4R8oD4AqGmwAMmsgQbuDH3XGycYGoajseRs LUT+VnHUAKz7DGBlwzajhPjNT0IojyEi3MUs/c62wIqavaUcoFqq5NXQ17xtj3jR ST8qgadNxxdnsc5PNUmD7m3NENQnF48pt7qM34/f5qaBmKrspjBlOX954hJkT95d aOSOsd1+YJHZZfKI9XinjyX8SkVU8A== =uQI6 -----END PGP SIGNATURE----- --=-=-=--