auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 01224b600d1ac47d787b2


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 01224b600d1ac47d787b2adfd88071b2a6a5f781
Date: Sat, 26 Aug 2017 12:49:37 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  01224b600d1ac47d787b2adfd88071b2a6a5f781 (commit)
      from  f3180f82fb8b20915bb6bce50bad778e31529145 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 01224b600d1ac47d787b2adfd88071b2a6a5f781
Author: Ikumi Keita <address@hidden>
Date:   Sun Aug 27 01:48:23 2017 +0900

    Add test for my commit on Aug 18
    
    * tests/japanese/parse-timing-test.tex:
    * tests/japanese/parse-timing.el:
    New file.

diff --git a/tests/japanese/parse-timing-test.tex 
b/tests/japanese/parse-timing-test.tex
new file mode 100644
index 0000000..c995cf5
--- /dev/null
+++ b/tests/japanese/parse-timing-test.tex
@@ -0,0 +1,2 @@
+\documentclass{jarticle}
+\usepackage{amsmath}
diff --git a/tests/japanese/parse-timing.el b/tests/japanese/parse-timing.el
new file mode 100644
index 0000000..c9f5243
--- /dev/null
+++ b/tests/japanese/parse-timing.el
@@ -0,0 +1,63 @@
+;;; parse-timing.el --- tests for parse timing
+
+;; Copyright (C) 2017 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.
+
+;;; Commentary:
+;; In AUCTeX, style hooks must not be executed too early.  In
+;; particular, they should not be called within the major mode hook
+;; because the required settings are sometimes not ready at that
+;; timing.  A difficult point is that many AUCTeX functions implicitly
+;; call `TeX-update-style', which eventually calls style hooks.  Thus
+;; a complicated hook sometimes triggers style hooks unintentionally.
+;; Such cases suits for detection via regression tests.
+
+;;; Code:
+
+(require 'ert)
+(require 'tex-jp)
+
+(defun AUCTeX-set-ert-path (&rest sym-val)
+  "Set first element of SYM-VAL to the next one, and so on.
+
+The value is the path to the test file, make sure it is expanded
+in the right directory even when the ERT test from the command
+line and from another directory."
+  (while sym-val
+    (set (pop sym-val)
+        (expand-file-name (pop sym-val)
+                          (when load-file-name
+                            (file-name-directory load-file-name))))))
+(AUCTeX-set-ert-path
+ 'parse-timing
+ "parse-timing-test.tex")
+
+(ert-deftest japanese-TeX-style-hook-timing ()
+  "Test style hooks are not called too early."
+  (let ((TeX-parse-self t)
+       (TeX-master t)
+       (LaTeX-mode-hook '(japanese-latex-mode-initialization
+                          turn-on-reftex)))
+    (find-file parse-timing)
+    (should (memq 'AMSTeX
+                 (get reftex-docstruct-symbol
+                      'reftex-label-alist-style)))
+    (kill-buffer)))
+
+;;; parse-timing.el ends here

-----------------------------------------------------------------------

Summary of changes:
 tests/japanese/parse-timing-test.tex               |  2 +
 .../context-test.el => japanese/parse-timing.el}   | 47 +++++++++++++---------
 2 files changed, 29 insertions(+), 20 deletions(-)
 create mode 100644 tests/japanese/parse-timing-test.tex
 copy tests/{context/context-test.el => japanese/parse-timing.el} (56%)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]