emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex a28aea0 01/57: Add test for my last commit


From: Tassilo Horn
Subject: [elpa] externals/auctex a28aea0 01/57: Add test for my last commit
Date: Tue, 25 Jul 2017 14:02:26 -0400 (EDT)

branch: externals/auctex
commit a28aea0a1562b3c6d9e47ee2a4ba14005dae289a
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Add test for my last commit
    
    * tests/japanese/error-parsing.el: New file.
---
 tests/japanese/error-parsing.el | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/tests/japanese/error-parsing.el b/tests/japanese/error-parsing.el
new file mode 100644
index 0000000..c2f8f90
--- /dev/null
+++ b/tests/japanese/error-parsing.el
@@ -0,0 +1,64 @@
+;;; error-parsing.el --- tests for error parsing
+
+;; 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.
+
+;;; Code:
+
+(require 'ert)
+(require 'tex-buf)
+(setq japanese-TeX-error-messages t)
+(require 'tex-jp)
+
+(ert-deftest japanese-TeX-help-message ()
+  "Test the fallback behavior of `TeX-help-error'.
+It should pick up error messages from the log file even if
+tex-jp.el modified `TeX-error-description-list'."
+  (should (let* ((dummyfile (make-temp-file "japanese-TeX-ert"))
+                (logfile (concat dummyfile ".log")))
+           (find-file logfile)
+           (insert "\
+./errorsamp.tex:3: EROOR NEVER COVERED BY TeX-error-description-list.
+l.3 }
+     
+FOO BAR
+HOGE FUGA
+")
+           (save-buffer 0)
+           (find-file dummyfile)
+           ;; Actually, the contents of dummyfile is irrelavent to
+           ;; this test.  It is only used to make the log file name
+           ;; which is analysed in `TeX-help-error' to be
+           ;; predictable.
+           (let ((TeX-command-buffer (current-buffer)))
+             (TeX-help-error
+              "EROOR NEVER COVERED BY TeX-error-description-list."
+              "" (current-buffer) 'error))
+           (delete-other-windows)
+           (kill-buffer (get-file-buffer logfile))
+           (delete-file logfile)
+           (kill-buffer (get-file-buffer dummyfile))
+           (delete-file dummyfile)
+           (set-buffer "*TeX Help*")
+           (goto-char (point-min))
+           (prog1
+               (search-forward "From the .log file...")
+             (kill-buffer)))))
+
+;;; error-parsing.el ends here



reply via email to

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