monnier pushed a commit to branch externals/auctex
in repository elpa.
commit f01ae735d5e11c3f64ce46aba5788cd537a55845
Author: Mosè Giordano <[email protected]>
Date: Sun Aug 24 22:20:38 2014 +0200
Add test for the %` expander.
* tests/tex/command-expansion.el: New test file.
---
ChangeLog | 4 ++++
tests/tex/command-expansion.el | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 09fff22..4bb50da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-24 Mos� Giordano <[email protected]>
+
+ * tests/tex/command-expansion.el: New test file.
+
2014-08-24 Florent Rougon <[email protected]> (tiny change)
* tex.el (TeX-expand-list): Add the previous position to the
diff --git a/tests/tex/command-expansion.el b/tests/tex/command-expansion.el
new file mode 100644
index 0000000..d6dfc89
--- /dev/null
+++ b/tests/tex/command-expansion.el
@@ -0,0 +1,36 @@
+;;; command-expansion.el --- tests for TeX command expansion
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX 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, or (at your option)
+;; any later version.
+
+;; AUCTeX 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 AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Code:
+
+(require 'ert)
+(require 'tex-buf)
+
+(ert-deftest TeX-command-expansion ()
+ "Check whether \"%%%%\" is correctly expanded when before \"%`\"."
+ (should (string=
+ (let ((TeX-command-list
+ (list (cons "Test" '("%%%% %`%'" TeX-run-command t t)))))
+ (TeX-command-expand (nth 1 (assoc "Test" TeX-command-list))
+ 'TeX-master-file))
+ "%% \"\\input\"")))
+
+;;; command-expansion.el ends here