branch: master commit 80cd28fb977b6d1ab8e848775feb47551a42730b Author: oleh <w...@mail.ua> Commit: oleh <w...@mail.ua>
tiny-test.el: added a test for `tiny-replace-this-sexp' --- tiny-test.el | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tiny-test.el b/tiny-test.el index 2350724..07667f8 100644 --- a/tiny-test.el +++ b/tiny-test.el @@ -140,6 +140,14 @@ SCHEDULED: <2013-11-25 Mon> DEADLINE: <2013-12-02 Mon> SCHEDULED: <2013-12-02 Mon> DEADLINE: <2013-12-09 Mon>" ))) +(ert-deftest tiny-replace-this-sexp () + (should (equal (with-text-value "(mapcar (lambda (x) (* x x)) '(1 2 3))" + (lambda()(goto-char 16)(tiny-replace-this-sexp)(buffer-string))) + "(1 4 9)")) + (should (equal (with-text-value "(mapcar (lambda (x) (* x x)) '(1 2 3))" + (lambda()(goto-char 2)(tiny-replace-this-sexp)(buffer-string))) + "(1 4 9)"))) + (ert-deftest tiny-tokenize () (should (equal (tiny-tokenize "stringxx") "(string x x)")) (should (equal (tiny-tokenize "*2+xxx") "(* 2 (+ x x x))"))