GNU bug report logs -
#37432
27.0.50; Add test suite for backquote.el
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Mon, 16 Sep 2019 20:51:03 UTC
Severity: normal
Tags: fixed, patch
Found in version 27.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 37432 in the body.
You can then email your comments to 37432 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37432
; Package
emacs
.
(Mon, 16 Sep 2019 20:51:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tino Calancha <tino.calancha <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 16 Sep 2019 20:51:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Tags: patch
--8<-----------------------------cut here---------------start------------->8---
commit d9c55842bf145e219e881080c87a42fc3ea82099
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date: Mon Sep 16 22:40:20 2019 +0200
Add test suite for backquote.el
* test/lisp/emacs-lisp/backquote-tests.el: New file.
diff --git a/test/lisp/emacs-lisp/backquote-tests.el b/test/lisp/emacs-lisp/backquote-tests.el
new file mode 100644
index 0000000000..8e35cc201b
--- /dev/null
+++ b/test/lisp/emacs-lisp/backquote-tests.el
@@ -0,0 +1,48 @@
+;;; backquote-tests.el --- Tests for backquote.el -*- lexical-binding: t -*-
+
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest backquote-test-basic ()
+ (let ((lst '(ba bb bc))
+ (vec [ba bb bc]))
+ (should (equal 3 `,(eval '(+ x y) '((x . 1) (y . 2)))))
+ (should (equal vec `[,@lst]))
+ (should (equal `(a lst c) '(a lst c)))
+ (should (equal `(a ,lst c) '(a (ba bb bc) c)))
+ (should (equal `(a ,@lst c) '(a ba bb bc c)))
+ ;; Vectors work just like lists.
+ (should (equal `(a vec c) '(a vec c)))
+ (should (equal `(a ,vec c) '(a [ba bb bc] c)))
+ (should (equal `(a ,@vec c) '(a ba bb bc c)))))
+
+(ert-deftest backquote-test-nested ()
+ "Test nested backquotes."
+ (let ((lst '(ba bb bc))
+ (vec [ba bb bc]))
+ (should (equal `(a ,`(,@lst) c) `(a ,lst c)))
+ (should (equal `(a ,`[,@lst] c) `(a ,vec c)))
+ (should (equal `(a ,@`[,@lst] c) `(a ,@lst c)))))
+
+
+;;; backquote-tests.el ends here
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 23, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
of 2019-09-16 built
Repository revision: 1a84d8fba4b526f7c8f240b8163e66714a41cca6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37432
; Package
emacs
.
(Mon, 16 Sep 2019 20:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 37432 <at> debbugs.gnu.org (full text, mbox):
Tino Calancha <tino.calancha <at> gmail.com> writes:
> Add test suite for backquote.el
>
> * test/lisp/emacs-lisp/backquote-tests.el: New file.
Looks good; applied to the trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 16 Sep 2019 20:59:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
37432 <at> debbugs.gnu.org and Tino Calancha <tino.calancha <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 16 Sep 2019 20:59:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 15 Oct 2019 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.