Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Ludovic Courtès
Dmitry Bogatov skribis: > Ludovic Courtès writes: > >> I share Ian Price’s concerns regarding the fundamental idea behind >> doctest. Namely, writing code in strings means that syntax errors can >> only be detected very late, and that the code in there cannot easily >> refer to anything outside

Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Dmitry Bogatov
Ludovic Courtès writes: > I share Ian Price’s concerns regarding the fundamental idea behind > doctest. Namely, writing code in strings means that syntax errors can > only be detected very late, and that the code in there cannot easily > refer to anything outside; What do you mean outside? I th

Re: [PATCH] Implement doctest utility as guild script

2013-09-29 Thread Ludovic Courtès
Hi, Thanks for the patch. kact...@gnu.org skribis: > +(define (substring-safe str index) > +" > +Return substring of STR, starting at INDEX, > +or empty string, if STR is too short. > + > ++++ (substring-safe \"1234\" 3) > +--- \"4\" > ++++ (substring-

[PATCH] Implement doctest utility as guild script

2013-09-27 Thread KAction
From: Dmitry Bogatov Syntax: +++ (some-expression) --- read-representation-of-expected-value --- another-one-if-multiple-values-returned Signed-off-by: Dmitry Bogatov --- module/scripts/doctest.scm | 73 module/scripts/doctest/docstring.scm | 110 ++