~ubuntu-branches/ubuntu/saucy/python-docutils/saucy-proposed

« back to all changes in this revision

Viewing changes to tools/editors/emacs/tests/init.el

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2012-10-19 18:23:15 UTC
  • mfrom: (1.2.1) (11.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20121019182315-ln3lvct1pqq7mzgm
Tags: 0.9.1+svn7532-0ubuntu1
* Resynchronize with Debian packaging SVN, remaining change:
  - Use dh_python2 instead of dh_pysupport.
* New snapshot from upstream SVN, fixes build with Python 3.3.
* Add XS-Testsuite header.
* debian/patches/move-data-to-usr-share.diff: unfuzz.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;; Initialize tests
 
2
 
 
3
(defun init-rst-ert (&optional with-buffer)
 
4
  "Initialize tests.
 
5
Prepare for buffer using tests if WITH-BUFFER."
 
6
  (when with-buffer
 
7
    (add-to-list 'load-path ".")
 
8
    (load "ert-buffer" nil t)
 
9
    (if (equal (car load-path) ".")
 
10
        (setq load-path (cdr load-path))))
 
11
 
 
12
  (add-to-list 'load-path "..")
 
13
  (load "rst.el" nil t)
 
14
  (if (equal (car load-path) "..")
 
15
      (setq load-path (cdr load-path)))
 
16
 
 
17
  ;; Emacs 24 should have a patch in `testcover-after` declaring a
 
18
  ;; `gv-expander'.
 
19
  (if (< emacs-major-version 24)
 
20
      ;; Define a setf-method for `testcover-after' so `ert' tests can be run
 
21
      ;; without problems.
 
22
      (defsetf testcover-after (idx val) (store)
 
23
        (list 'progn
 
24
              (list 'testcover-after idx val)
 
25
              ;; FIXME: Though it solves the problem it is not really correct
 
26
              ;;        because `val' is only a temporary variable here.
 
27
              (list 'setf val store)))))
 
28
 
 
29
;; Clean up `load-path' if set caller just to load this file.
 
30
(if (equal (car load-path) ".")
 
31
    (setq load-path (cdr load-path)))