1 ;;;_ elinstall/tests.el --- Tests for elinstall
5 ;; Copyright (C) 2010 Tom Breton (Tehom)
7 ;; Author: Tom Breton (Tehom) <tehom@panix.com>
8 ;; Keywords: lisp, maint, internal
10 ;; This file is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This file is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
32 (require 'emtest
/runner
/define
)
33 (require 'emtest
/testhelp
/standard
)
36 (require 'emtest
/testhelp
/testpoint
/requirer
))
42 ;;;_ . elinstall:th:surrounders
43 (defconst elinstall
:th
:surrounders
44 ;;Mock customize-save-variable to do nothing.
45 ;;Also mock interaction: yes-or-no-p. This suggests that I should
46 ;;articulate the package more, to separate interaction.
47 '((emtp:insulate
(customize-save-variable)))
48 "The normal surrounders for elinstall tests" )
49 ;;;_ . elinstall:th:insulate-defines
50 (defconst elinstall
:th
:insulate-defines
54 "Surrounders so that we can define things and still be insulated" )
58 ((of 'elinstall-already-installed
)
59 (:surrounders elinstall
:th
:surrounders
))
63 ((elinstall-already-installed nil
))
64 (emt:doc
"Situation: Nothing has been installed.")
65 (emt:doc
"Operation: Query whether EXAMPLE has been installed.")
66 (emt:doc
"Response: give nil.")
69 (elinstall-already-installed "example")))
71 (emt:doc
"Operation: Record that EXAMPLE has been installed.")
73 (elinstall-record-installed "example")
74 (emt:doc
"Operation: Query whether EXAMPLE has been installed.")
75 (emt:doc
"Response: give true.")
77 (elinstall-already-installed "example")))))
79 ;;;_ , Generating the right actions
81 ;;;_ , Given list of actions, segregate it right.
83 ;;;_ , Given list of actions, doing the right adds to deffile
84 ;;Test by reading stuff back.
89 (provide 'elinstall
/tests
)
91 ;;;_ * Local emacs vars.
92 ;;;_ + Local variables:
97 ;;; elinstall/tests.el ends here