diff options
| author | Glenn Morris | 2014-06-28 10:27:29 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-06-28 10:27:29 -0700 |
| commit | e0d9c3c9a26ba2982595ec2ec4a1167ee7e39ddb (patch) | |
| tree | 263b47445b665a686c37c5c5628f17446a98c3f8 /test | |
| parent | 14202f05ac84869af2d839ba022ea983b7642770 (diff) | |
| parent | b084415e278d54c6f9ee8406b1af8adc2364576c (diff) | |
| download | emacs-e0d9c3c9a26ba2982595ec2ec4a1167ee7e39ddb.tar.gz emacs-e0d9c3c9a26ba2982595ec2ec4a1167ee7e39ddb.zip | |
Merge from emacs-24; up to 2014-06-12T14:55:48Z!monnier@iro.umontreal.ca
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 11 | ||||
| -rw-r--r-- | test/automated/calc-tests.el | 42 | ||||
| -rw-r--r-- | test/automated/dbus-tests.el | 10 |
3 files changed, 58 insertions, 5 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c9bfc54bd8d..617ac98f5d8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-06-28 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * automated/calc-tests.el: New file and add tests for math-bignum. | ||
| 4 | (Bug#17556) | ||
| 5 | |||
| 6 | 2014-06-28 Michael Albinus <michael.albinus@gmx.de> | ||
| 7 | |||
| 8 | * automated/dbus-tests.el (dbus--test-register-service) | ||
| 9 | (dbus-test02-register-service-session): Replace `dbus-ping' calls | ||
| 10 | by `dbus-list-known-names'. (Bug#17858) | ||
| 11 | |||
| 1 | 2014-06-28 Glenn Morris <rgm@gnu.org> | 12 | 2014-06-28 Glenn Morris <rgm@gnu.org> |
| 2 | 13 | ||
| 3 | * automated/Makefile.in (GDB): New variable. | 14 | * automated/Makefile.in (GDB): New variable. |
diff --git a/test/automated/calc-tests.el b/test/automated/calc-tests.el new file mode 100644 index 00000000000..b96a9e83e75 --- /dev/null +++ b/test/automated/calc-tests.el | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | ;;; calc-tests.el --- tests for calc -*- lexical-binding: t; -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2014 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Leo Liu <sdl.web@gmail.com> | ||
| 6 | ;; Keywords: maint | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 10 | ;; GNU Emacs 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 3 of the License, or | ||
| 13 | ;; (at your option) any later version. | ||
| 14 | |||
| 15 | ;; GNU Emacs 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. | ||
| 19 | |||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;;; Code: | ||
| 26 | |||
| 27 | (require 'cl-lib) | ||
| 28 | (require 'ert) | ||
| 29 | (require 'calc) | ||
| 30 | |||
| 31 | (ert-deftest test-math-bignum () | ||
| 32 | ;; bug#17556 | ||
| 33 | (let ((n (math-bignum most-negative-fixnum))) | ||
| 34 | (should (math-negp n)) | ||
| 35 | (should (cl-notany #'cl-minusp (cdr n))))) | ||
| 36 | |||
| 37 | (provide 'calc-tests) | ||
| 38 | ;;; calc-tests.el ends here | ||
| 39 | |||
| 40 | ;; Local Variables: | ||
| 41 | ;; bug-reference-url-format: "http://debbugs.gnu.org/%s" | ||
| 42 | ;; End: | ||
diff --git a/test/automated/dbus-tests.el b/test/automated/dbus-tests.el index c9d9c72ec1d..1af5c77de53 100644 --- a/test/automated/dbus-tests.el +++ b/test/automated/dbus-tests.el | |||
| @@ -88,15 +88,15 @@ | |||
| 88 | 88 | ||
| 89 | ;; Register an own service. | 89 | ;; Register an own service. |
| 90 | (should (eq (dbus-register-service bus dbus-service-emacs) :primary-owner)) | 90 | (should (eq (dbus-register-service bus dbus-service-emacs) :primary-owner)) |
| 91 | (should (dbus-ping bus dbus-service-emacs 100)) | 91 | (should (member dbus-service-emacs (dbus-list-known-names bus))) |
| 92 | (should (eq (dbus-register-service bus dbus-service-emacs) :already-owner)) | 92 | (should (eq (dbus-register-service bus dbus-service-emacs) :already-owner)) |
| 93 | (should (dbus-ping bus dbus-service-emacs 100)) | 93 | (should (member dbus-service-emacs (dbus-list-known-names bus))) |
| 94 | 94 | ||
| 95 | ;; Unregister the service. | 95 | ;; Unregister the service. |
| 96 | (should (eq (dbus-unregister-service bus dbus-service-emacs) :released)) | 96 | (should (eq (dbus-unregister-service bus dbus-service-emacs) :released)) |
| 97 | (should-not (dbus-ping bus dbus-service-emacs 100)) | 97 | (should-not (member dbus-service-emacs (dbus-list-known-names bus))) |
| 98 | (should (eq (dbus-unregister-service bus dbus-service-emacs) :non-existent)) | 98 | (should (eq (dbus-unregister-service bus dbus-service-emacs) :non-existent)) |
| 99 | (should-not (dbus-ping bus dbus-service-emacs 100)) | 99 | (should-not (member dbus-service-emacs (dbus-list-known-names bus))) |
| 100 | 100 | ||
| 101 | ;; `dbus-service-dbus' is reserved for the BUS itself. | 101 | ;; `dbus-service-dbus' is reserved for the BUS itself. |
| 102 | (should-error (dbus-register-service bus dbus-service-dbus)) | 102 | (should-error (dbus-register-service bus dbus-service-dbus)) |
| @@ -109,7 +109,7 @@ | |||
| 109 | (dbus--test-register-service :session) | 109 | (dbus--test-register-service :session) |
| 110 | 110 | ||
| 111 | (let ((service "org.freedesktop.Notifications")) | 111 | (let ((service "org.freedesktop.Notifications")) |
| 112 | (when (dbus-ping :session service 100) | 112 | (when (member service (dbus-list-known-names :session)) |
| 113 | ;; Cleanup. | 113 | ;; Cleanup. |
| 114 | (dbus-ignore-errors (dbus-unregister-service :session service)) | 114 | (dbus-ignore-errors (dbus-unregister-service :session service)) |
| 115 | 115 | ||