GNU bug report logs - #24935
[PATCH] Add tests for rot13.el

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> gmail.com>

Date: Sun, 13 Nov 2016 11:08:01 UTC

Severity: wishlist

Tags: patch

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24935 in the body.
You can then email your comments to 24935 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24935; Package emacs. (Sun, 13 Nov 2016 11:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simen Heggestøyl <simenheg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 13 Nov 2016 11:08:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add tests for rot13.el
Date: Sun, 13 Nov 2016 12:07:36 +0100
[Message part 1 (text/plain, inline)]
Hello,

I saw that there weren't any tests for rot13.el yet, so I wrote
some. I also made a docstring correction along the way.

Unless there are any objections, I'll install the patch within a few
days.

I also plan to turn on lexical binding for rot13.el in a follow-up
commit.

-- Simen
[0001-Add-tests-for-rot13.el.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24935; Package emacs. (Sun, 13 Nov 2016 15:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 24935 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 24935 <at> debbugs.gnu.org
Subject: Re: bug#24935: [PATCH] Add tests for rot13.el
Date: Sun, 13 Nov 2016 17:39:31 +0200
> Date: Sun, 13 Nov 2016 12:07:36 +0100
> From: Simen Heggestøyl <simenheg <at> gmail.com>
> 
> I saw that there weren't any tests for rot13.el yet, so I wrote
> some. I also made a docstring correction along the way.

Thanks.  A comment below.

> Unless there are any objections, I'll install the patch within a few
> days.

To the master branch, please.

>  ;;;###autoload
>  (defun rot13 (object &optional start end)
> -  "Return ROT13 encryption of OBJECT, a buffer or string."
> +  "ROT13 encrypt OBJECT, a buffer or string.
> +Return the ROT13 encrypted string when OBJECT is a string."

If we are going to fix the doc string, let's also document START and
END, and tell that they are ignored if OBJECT is a string.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24935; Package emacs. (Tue, 15 Nov 2016 18:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 24935 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24935 <at> debbugs.gnu.org
Subject: Re: bug#24935: [PATCH] Add tests for rot13.el
Date: Tue, 15 Nov 2016 19:43:55 +0100
On Sun, Nov 13, 2016 at 4:39 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> If we are going to fix the doc string, let's also document START and
> END, and tell that they are ignored if OBJECT is a string.

I agree. How about the following?

 "ROT13 encrypt OBJECT, a buffer or string.
Return the ROT13 encrypted string when OBJECT is a string,
ignoring START and END.  ROT13 encrypt the region between
positions START and END when OBJECT is a buffer; all three
arguments are then required."

-- Simen





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24935; Package emacs. (Tue, 15 Nov 2016 20:24:01 GMT) Full text and rfc822 format available.

Message #14 received at 24935 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 24935 <at> debbugs.gnu.org
Subject: Re: bug#24935: [PATCH] Add tests for rot13.el
Date: Tue, 15 Nov 2016 22:23:32 +0200
> Date: Tue, 15 Nov 2016 19:43:55 +0100
> From: Simen Heggestøyl <simenheg <at> gmail.com>
> Cc: 24935 <at> debbugs.gnu.org
> 
>   "ROT13 encrypt OBJECT, a buffer or string.
> Return the ROT13 encrypted string when OBJECT is a string,
> ignoring START and END.  ROT13 encrypt the region between
> positions START and END when OBJECT is a buffer; all three
> arguments are then required."

It sounds strange to describe first the use case where the arguments
are ignored.  I suggest this instead:

  ROT13 encrypt OBJECT, a buffer or string.
If OBJECT is a buffer, encrypt the region between START and END.
If OBJECT is a string, encrypt it in its entirety, ignoring START
and END, and return the encrypted string.




Reply sent to Simen Heggestøyl <simenheg <at> gmail.com>:
You have taken responsibility. (Thu, 17 Nov 2016 18:24:01 GMT) Full text and rfc822 format available.

Notification sent to Simen Heggestøyl <simenheg <at> gmail.com>:
bug acknowledged by developer. (Thu, 17 Nov 2016 18:24:01 GMT) Full text and rfc822 format available.

Message #19 received at 24935-done <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24935-done <at> debbugs.gnu.org
Subject: Re: bug#24935: [PATCH] Add tests for rot13.el
Date: Thu, 17 Nov 2016 19:23:17 +0100
Sounds good to me, thanks.

Installed with your suggested change.

-- Simen

On Tue, Nov 15, 2016 at 9:23 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>  Date: Tue, 15 Nov 2016 19:43:55 +0100
>>  From: Simen Heggestøyl <simenheg <at> gmail.com>
>>  Cc: 24935 <at> debbugs.gnu.org
>> 
>>    "ROT13 encrypt OBJECT, a buffer or string.
>>  Return the ROT13 encrypted string when OBJECT is a string,
>>  ignoring START and END.  ROT13 encrypt the region between
>>  positions START and END when OBJECT is a buffer; all three
>>  arguments are then required."
> 
> It sounds strange to describe first the use case where the arguments
> are ignored.  I suggest this instead:
> 
>   ROT13 encrypt OBJECT, a buffer or string.
> If OBJECT is a buffer, encrypt the region between START and END.
> If OBJECT is a string, encrypt it in its entirety, ignoring START
> and END, and return the encrypted string.
> 
> 
> 





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 16 Dec 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.