1
;;; py-completion-tests.el --- Test completion for available Python shell
3
;; Author: Andreas Roehler <andreas.roehler@online.de>
4
;; Keywords: languages, convenience
6
;; This program is free software; you can redistribute it and/or modify
7
;; it under the terms of the GNU General Public License as published by
8
;; the Free Software Foundation, either version 3 of the License, or
9
;; (at your option) any later version.
11
;; This program is distributed in the hope that it will be useful,
12
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
;; GNU General Public License for more details.
16
;; You should have received a copy of the GNU General Public License
17
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
19
;;; Commentary: Edit `py-test-pyshellname-list' before
20
;; running this test-builder or give a list of shells as
25
(defun python-complete-test (&optional arg)
27
(let ((teststring "#! /usr/bin/env python
29
(py-bug-tests-intern 'python-complete-base arg teststring)))
31
(defun python-complete-base ()
32
(save-excursion (completion-at-point))
34
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
36
(defun usr-bin-python-complete-test (&optional arg)
38
(let ((teststring "#! /usr/bin/python
40
(py-bug-tests-intern 'usr-bin-python-complete-base arg teststring)))
42
(defun usr-bin-python-complete-base ()
43
(save-excursion (completion-at-point))
45
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
47
(defun usr-bin-python2.7-complete-test (&optional arg)
49
(let ((teststring "#! /usr/bin/python2.7
51
(py-bug-tests-intern 'usr-bin-python2.7-complete-base arg teststring)))
53
(defun usr-bin-python2.7-complete-base ()
54
(save-excursion (completion-at-point))
56
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
58
(defun home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-test (&optional arg)
60
(let ((teststring "#! /home/speck/arbeit/python/epdfree/epd_free-7.2-2-rh5-x86/bin/python2.7
62
(py-bug-tests-intern 'home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-base arg teststring)))
64
(defun home-speck-arbeit-python-epdfree-epd_free-7.2-2-rh5-x86-bin-python2.7-complete-base ()
65
(save-excursion (completion-at-point))
67
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
69
(defun usr-bin-python3-complete-test (&optional arg)
71
(let ((teststring "#! /usr/bin/python3
73
(py-bug-tests-intern 'usr-bin-python3-complete-base arg teststring)))
75
(defun usr-bin-python3-complete-base ()
76
(save-excursion (completion-at-point))
78
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
80
(defun usr-bin-python3.1-complete-test (&optional arg)
82
(let ((teststring "#! /usr/bin/python3.1
84
(py-bug-tests-intern 'usr-bin-python3.1-complete-base arg teststring)))
86
(defun usr-bin-python3.1-complete-base ()
87
(save-excursion (completion-at-point))
89
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
91
(defun ipython-complete-test (&optional arg)
93
(let ((teststring "#! /usr/bin/env ipython
95
(py-bug-tests-intern 'ipython-complete-base arg teststring)))
97
(defun ipython-complete-base ()
98
(save-excursion (completion-at-point))
100
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
102
(defun usr-bin-ipython-complete-test (&optional arg)
104
(let ((teststring "#! /usr/bin/ipython
106
(py-bug-tests-intern 'usr-bin-ipython-complete-base arg teststring)))
108
(defun usr-bin-ipython-complete-base ()
109
(save-excursion (completion-at-point))
111
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
113
(defun home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-test (&optional arg)
115
(let ((teststring "#! /home/speck/arbeit/python/epd_free-7.1-2-rh5-x86/bin/ipython
117
(py-bug-tests-intern 'home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-base arg teststring)))
119
(defun home-speck-arbeit-python-epd_free-7.1-2-rh5-x86-bin-ipython-complete-base ()
120
(save-excursion (completion-at-point))
122
(assert (looking-at "nt") nil "py-completion-at-point-test failed"))
125
(provide "py-completion-tests")
126
;;; py-completion-tests ends here