File: 0001-Update-test-case-for-Debian-Package.patch

package info (click to toggle)
howm 1.5.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,336 kB
  • sloc: lisp: 8,748; sh: 3,558; ruby: 996; makefile: 98; python: 47
file content (77 lines) | stat: -rw-r--r-- 2,922 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From: FUJIMURA Yuki <ykfj@users.sourceforge.jp>
Date: Wed, 2 Jun 2010 17:46:45 +0900
Subject: Update test-case for Debian Package

Forwarded: not-needed
Author: FUJIMURA Yuki <ykfj@users.sourceforge.jp>
Last-Update: 2012-03-21
---
 howm-misc.el     |  2 +-
 sample/dot.emacs | 43 +++++++++++++++++++++++++++++++++++++------
 2 files changed, 38 insertions(+), 7 deletions(-)

--- a/howm-misc.el
+++ b/howm-misc.el
@@ -1038,7 +1038,7 @@
 (defun howm-bug-report (&optional show-sym)
   (interactive "P")
   (let ((report-buf (format-time-string "howm-bug-report-%Y%m%d-%H%M%S"))
-        (template "sample/bug-report.txt"))
+        (template (expand-file-name "sample/bug-report.txt" howm-directory)))
     (switch-to-buffer report-buf)
     (when (not (howm-buffer-empty-p))
       (error "Buffer %s exists (and not empty)." report-buf))
--- a/sample/dot.emacs
+++ b/sample/dot.emacs
@@ -1,16 +1,44 @@
 ;;; -*- lexical-binding: nil; -*-
-
-(setq load-path (cons default-directory load-path))
+;;
+;; Copyright Holder: HIRAOKA Kazuyuki <khi@users.sourceforge.jp>
+;; Modifier: Yuki Fujimura <ykfj@users.sourceforge.jp>
+;;           Youhei SASAKI <uwabami@gfd-dennou.org>
+;;
+;; First, try followed.
+;;
+;;   $ HOWM_TEST=t emacs -q -no-site-file -l /usr/share/doc/howm/sample/dot.emacs
+;;
+;; If it reproduces, report to upstream author.
+;;
+;; If it it not reproduces, its source of trouble will be your .emacs.
+;;
+;; You may pursue the exact cause of bug, and properly report to
+;; upstream author or package maintainer.
+;;
 (setq debug-on-error t)
 (setq font-lock-verbose t)
 (setq inhibit-startup-message t)
 
-(setq howm-sample-directory (expand-file-name "sample/"))
-(setq howm-directory howm-sample-directory)
-(setq howm-keyword-file (expand-file-name ".howm-keys" howm-sample-directory))
-(setq howm-history-file (expand-file-name ".howm-history" howm-sample-directory))
+(setq howm-sample-directory "/usr/share/doc/howm/sample")
+(setq howm-directory (expand-file-name (make-temp-name "howm-test-")
+                                       (or (getenv "TMPDIR")
+                                           (getenv "TEMP")
+                                           (getenv "TMP")
+                                           "/tmp")))
+(setq howm-keyword-file (expand-file-name ".howm-keys" howm-directory))
+(setq howm-history-file (expand-file-name ".howm-history" howm-directory))
 ;(setq howm-menu-lang 'ja)
 (setq howm-history-limit nil)  ;; Don't erase my ~/.howm-history.
 
 (require 'howm)
-(howm-test)
+(let ((howm-version (concat howm-version " (Debian Unofficial Package)")))
+  (make-directory howm-directory)
+  (call-process "cp" nil nil nil
+                "-rp" howm-sample-directory howm-directory)
+  (add-hook 'kill-emacs-hook
+            (lambda ()
+              (call-process "rm" nil nil nil
+                            "-rf" howm-directory)
+              ))
+  (howm-test))
+