From: Oleh Krehel Date: Fri, 8 May 2015 13:34:46 +0000 (+0200) Subject: Add 'packages/avy/' from commit '32003515c8efa2cf38b62c45499dae30bc7cacb8' X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/876d210333969ec8c6723216917150c7b532082e Add 'packages/avy/' from commit '32003515c8efa2cf38b62c45499dae30bc7cacb8' git-subtree-dir: packages/avy git-subtree-mainline: 74b34f2bbb929a1caf5cf753e59c54c3ccb74f50 git-subtree-split: 32003515c8efa2cf38b62c45499dae30bc7cacb8 --- 876d210333969ec8c6723216917150c7b532082e diff --cc packages/avy/Makefile index 000000000,e1551794f..e1551794f mode 000000,100644..100644 --- a/packages/avy/Makefile +++ b/packages/avy/Makefile diff --cc packages/avy/README.md index 000000000,01bf587de..01bf587de mode 000000,100644..100644 --- a/packages/avy/README.md +++ b/packages/avy/README.md diff --cc packages/avy/avy-init.el index 000000000,37cf18e86..37cf18e86 mode 000000,100644..100644 --- a/packages/avy/avy-init.el +++ b/packages/avy/avy-init.el diff --cc packages/avy/avy-jump.el index 000000000,d6bb52e79..d6bb52e79 mode 000000,100644..100644 --- a/packages/avy/avy-jump.el +++ b/packages/avy/avy-jump.el diff --cc packages/avy/avy-test.el index 000000000,000000000..339d8a06d new file mode 100644 --- /dev/null +++ b/packages/avy/avy-test.el @@@ -1,0 -1,0 +1,68 @@@ ++;;; avy-test.el --- Tests for avy ++ ++;; Copyright (C) 2015 Free Software Foundation, Inc. ++ ++;; Author: Oleh Krehel ++ ++;; This file is part of GNU Emacs. ++ ++;; GNU Emacs 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 of the License, or ++;; (at your option) any later version. ++ ++;; GNU Emacs 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 GNU Emacs. If not, see . ++ ++;;; Commentary: ++;; ++ ++;;; Code: ++ ++(require 'ert) ++(require 'avy) ++ ++(ert-deftest avy-subdiv () ++ (should ++ (equal (avy-subdiv 5 4) ++ '(1 1 1 2))) ++ (should ++ (equal (avy-subdiv 10 4) ++ '(1 1 4 4))) ++ (should ++ (equal (avy-subdiv 16 4) ++ '(4 4 4 4))) ++ (should ++ (equal (avy-subdiv 17 4) ++ '(4 4 4 5))) ++ (should ++ (equal (avy-subdiv 27 4) ++ '(4 4 4 15))) ++ (should ++ (equal (avy-subdiv 50 4) ++ '(4 14 16 16))) ++ (should ++ (equal (avy-subdiv 65 4) ++ '(16 16 16 17)))) ++ ++(ert-deftest avy-tree () ++ (should ++ (equal ++ (avy-tree '(0 1 2 3 4 5 6 7 8 9 10) ++ '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) ++ '((97 leaf . 0) ++ (115 leaf . 1) ++ (100 leaf . 2) ++ (102 leaf . 3) ++ (103 leaf . 4) ++ (104 leaf . 5) ++ (106 leaf . 6) ++ (107 leaf . 7) ++ (108 (97 leaf . 8) ++ (115 leaf . 9) ++ (100 leaf . 10)))))) diff --cc packages/avy/avy.el index 000000000,6a0dea762..6a0dea762 mode 000000,100644..100644 --- a/packages/avy/avy.el +++ b/packages/avy/avy.el