diff options
| author | Mark Oteiza | 2017-09-05 12:03:10 -0400 |
|---|---|---|
| committer | Mark Oteiza | 2017-09-05 12:03:10 -0400 |
| commit | 485e25312d56b6bdf59da6ade1ec08f8caaa240a (patch) | |
| tree | 700c918c945e7fd2f48f5878bf1f0f296a60592e /lisp | |
| parent | 9f64d59ae6d87f38276fe05254094113a171fb0e (diff) | |
| download | emacs-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 'lisp')
| -rw-r--r-- | lisp/soundex.el | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lisp/soundex.el b/lisp/soundex.el index e0d83303e34..a83bab8a910 100644 --- a/lisp/soundex.el +++ b/lisp/soundex.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; soundex.el --- implement Soundex algorithm | 1 | ;;; soundex.el --- implement Soundex algorithm -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 2001-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993, 2001-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -29,7 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (defvar soundex-alist | 32 | (defconst soundex-alist |
| 33 | '((?B . "1") (?F . "1") (?P . "1") (?V . "1") | 33 | '((?B . "1") (?F . "1") (?P . "1") (?V . "1") |
| 34 | (?C . "2") (?G . "2") (?J . "2") (?K . "2") (?Q . "2") (?S . "2") | 34 | (?C . "2") (?G . "2") (?J . "2") (?K . "2") (?Q . "2") (?S . "2") |
| 35 | (?X . "2") (?Z . "2") (?D . "3") (?T . "3") (?L . "4") (?M . "5") | 35 | (?X . "2") (?Z . "2") (?D . "3") (?T . "3") (?L . "4") (?M . "5") |
| @@ -60,15 +60,6 @@ and Searching\", Addison-Wesley (1973), pp. 391-392." | |||
| 60 | (substring (concat key "000") 0 4) | 60 | (substring (concat key "000") 0 4) |
| 61 | key))) | 61 | key))) |
| 62 | 62 | ||
| 63 | ;(defvar soundex-test | ||
| 64 | ; '("Euler" "Gauss" "Hilbert" "Knuth" "Lloyd" "Lukasiewicz" | ||
| 65 | ; "Ellery" "Ghosh" "Heilbronn" "Kant" "Ladd" "Lissajous") | ||
| 66 | ; "\n Knuth's names to demonstrate the Soundex algorithm.") | ||
| 67 | ; | ||
| 68 | ;(mapcar 'soundex soundex-test) | ||
| 69 | ;("E460" "G200" "H416" "K530" "L300" "L222" | ||
| 70 | ; "E460" "G200" "H416" "K530" "L300" "L222") | ||
| 71 | |||
| 72 | (provide 'soundex) | 63 | (provide 'soundex) |
| 73 | 64 | ||
| 74 | ;;; soundex.el ends here | 65 | ;;; soundex.el ends here |