summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/macroexp-tests.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-02-20 18:00:36 +0900
committerYuuki Harano <masm+github@masm11.me>2021-02-20 18:00:36 +0900
commitbe2e47362b0f933dbc8e300e3d168296b7e2aac4 (patch)
tree3b14e2e66d33566b81cb1d6e8bb04551d95dd2b9 /test/lisp/emacs-lisp/macroexp-tests.el
parent949d3e50ec4ea7723bf14b93b66ad0b72f96f163 (diff)
parentc85c8e7d42ae2a5fc95fa7b14257389d8383b34d (diff)
downloademacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.tar.gz
emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.tar.bz2
emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/emacs-lisp/macroexp-tests.el')
-rw-r--r--test/lisp/emacs-lisp/macroexp-tests.el36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/macroexp-tests.el b/test/lisp/emacs-lisp/macroexp-tests.el
new file mode 100644
index 00000000000..1124e3b8d91
--- /dev/null
+++ b/test/lisp/emacs-lisp/macroexp-tests.el
@@ -0,0 +1,36 @@
+;;; macroexp-tests.el --- Tests for macroexp.el -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Stefan Monnier
+
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
+;; Keywords:
+
+;; This program 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.
+
+;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(ert-deftest macroexp--tests-fgrep ()
+ (should (equal (macroexp--fgrep '((x) (y)) '([x] z ((u))))
+ '((x))))
+ (should (equal (macroexp--fgrep '((x) (y)) '#2=([y] ((y #2#))))
+ '((y))))
+ (should (equal (macroexp--fgrep '((x) (y)) '#2=([r] ((a x)) a b c d . #2#))
+ '((x)))))
+
+(provide 'macroexp-tests)
+;;; macroexp-tests.el ends here