aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMark Oteiza2017-09-05 12:03:10 -0400
committerMark Oteiza2017-09-05 12:03:10 -0400
commit485e25312d56b6bdf59da6ade1ec08f8caaa240a (patch)
tree700c918c945e7fd2f48f5878bf1f0f296a60592e /test
parent9f64d59ae6d87f38276fe05254094113a171fb0e (diff)
downloademacs-485e25312d56b6bdf59da6ade1ec08f8caaa240a.tar.gz
emacs-485e25312d56b6bdf59da6ade1ec08f8caaa240a.zip
Move soundex.el test to a proper test
* test/lisp/soundex-tests.el: New file. * lisp/soundex.el: Use lexical-binding. Remove commented test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/soundex-tests.el43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/lisp/soundex-tests.el b/test/lisp/soundex-tests.el
new file mode 100644
index 00000000000..d1bc99d8113
--- /dev/null
+++ b/test/lisp/soundex-tests.el
@@ -0,0 +1,43 @@
1;;; soundex-tests.el --- tests for soundex.el -*- lexical-binding: t -*-
2
3;; Copyright (C) 2017 Free Software Foundation, Inc.
4
5;; Maintainer: emacs-devel@gnu.org
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Commentary:
23
24;; Test `soundex-test-names' originally adapted from code in
25;; soundex.el by Christian Plaunt <chris@bliss.berkeley.edu>
26
27;;; Code:
28
29(require 'ert)
30(require 'soundex)
31
32(defconst soundex-test-name-list
33 '("Euler" "Gauss" "Hilbert" "Knuth" "Lloyd" "Lukasiewicz"
34 "Ellery" "Ghosh" "Heilbronn" "Kant" "Ladd" "Lissajous")
35 "Knuth's names to demonstrate the Soundex algorithm.")
36
37(ert-deftest soundex-test-names ()
38 (should
39 (equal (mapcar #'soundex soundex-test-name-list)
40 '("E460" "G200" "H416" "K530" "L300" "L222"
41 "E460" "G200" "H416" "K530" "L300" "L222"))))
42
43;;; soundex-tests.el ends here