GNU bug report logs - #36452
[PATCH] Add tests for bookmark.el

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Sun, 30 Jun 2019 23:34:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36452 <at> debbugs.gnu.org
Subject: bug#36452: [PATCH] Add tests for bookmark.el
Date: Wed, 3 Jul 2019 08:33:22 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> Thanks.  Can you tell the approximate coverage of bookmark
> functionality by these tests?

All core functionality is tested.  I didn't test interactive stuff
like bookmark-completing-read, nor did I bother testing the ancient
code that upgrades from the pre-1995 bookmark format.  Other than
that, I would say that it's comprehensive.

Running the tests it with M-x testcover-* unfortunately does not give
an exact figure, but I don't see any important code paths that have
been missed.

> One particular aspect of the bookmarks that I'd like to see tested is
> non-ASCII bookmark names and annotations.  The code includes some
> slightly involved logic for determining how to encode the info on
> disk, so I wonder how well does that work in practice.

OK.  I added tests for that in the attached patch using strings
manually copied from HELLO.  It works just fine to save and then load
bookmarks for the set of languages I chose to include characters from.
That is, we have the same before bookmark-save as we get after
bookmark-load.

> > \ No newline at end of file
>
> Is this lack of newline intentional?

Yes.  This is how this file is written by `bookmark-write-file'.
However, I think it would be nice if it did add the newline (e.g. for
files under VC), so I changed that here.

Thank you for your review.  Please find attached an updated version of
the patch.

Best regards,
Stefan Kangas
[0001-Add-tests-for-bookmark.el-Bug-36452.patch (application/octet-stream, attachment)]

This bug report was last modified 5 years and 328 days ago.

Previous Next


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