bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38628: [PATCH] gexp: Allow character literals in GEXP->SEXP.


From: Ludovic Courtès
Subject: bug#38628: [PATCH] gexp: Allow character literals in GEXP->SEXP.
Date: Thu, 19 Dec 2019 12:11:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Marius,

Marius Bakke <address@hidden> skribis:

> Marius Bakke <address@hidden> writes:
>
>> Ludovic Courtès <address@hidden> 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 #$+)))))
>>  
>> +(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.

We could have called ‘gexp->sexp’ directly, but we’d still need the
store anyway, so IMO that’s good!

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]