branch: elpa/flx
commit 7110df04e26858e6fa1b0fda744cee9bd381e7a8
Author: Le Wang <[email protected]>
Commit: Le Wang <[email protected]>
update tests
---
mflex-sort.el | 22 --------------------
tests/flx-test.el | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 58 insertions(+), 26 deletions(-)
diff --git a/mflex-sort.el b/mflex-sort.el
deleted file mode 100644
index a4812605db..0000000000
--- a/mflex-sort.el
+++ /dev/null
@@ -1,22 +0,0 @@
-
-(defun mflex-all-combinations (list num)
- "let LENGTH = (length list)
-
-return all combinations of sequences of NUM elements from list.
-
-The length of the resulting list is ("
- (let ((length (length list))
- (head (car list))
- (rest (cdr list)))
- (cond ((= 0 num)
- (list nil))
- ((= length num)
- (list list))
- (t
- (append (mapcar
- (lambda (list)
- (cons head list))
- (mflex-all-combinations rest (1- num)))
- (mflex-all-combinations rest num))))))
-
-(provide 'mflex)
\ No newline at end of file
diff --git a/tests/flx-test.el b/tests/flx-test.el
index c4c849a65a..eace83870a 100644
--- a/tests/flx-test.el
+++ b/tests/flx-test.el
@@ -1,10 +1,61 @@
+;;; flx-test.el ---
+
+;; this file is not part of Emacs
+
+;; Copyright (C) 2013 Le Wang
+;; Author: Le Wang
+;; Maintainer: Le Wang
+;; Description:
+;; Author: Le Wang
+;; Maintainer: Le Wang
+
+;; Created: Tue Apr 16 23:32:32 2013 (+0800)
+;; Version: 0.1
+;; Last-Updated:
+;; By:
+;; Update #: 2
+;; URL:
+;; Keywords:
+;; Compatibility:
+
+;;; Installation:
+
+;;
+;;
+;;
+
+;;; Commentary:
+
+;;
+;;
+;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 3, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
(require 'ert)
(require 'flx)
-
-;; for "every" function
-(require 'cl)
-
(ert-deftest flx-test-sanity ()
"sanity check."
(should (= 1 1)))
@@ -277,3 +328,6 @@ In this case, the match with more contiguous characters is
better."
(lower (flx-score "doc/command-t.txt" query
(flx-make-filename-cache))))
(should (> (car higher) (car lower))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; flx-test.el ends here