emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 80cd28f 28/46: tiny-test.el: added a test for `tiny-replac


From: Oleh Krehel
Subject: [elpa] master 80cd28f 28/46: tiny-test.el: added a test for `tiny-replace-this-sexp'
Date: Sun, 22 Mar 2015 17:42:34 +0000

branch: master
commit 80cd28fb977b6d1ab8e848775feb47551a42730b
Author: oleh <address@hidden>
Commit: oleh <address@hidden>

    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))"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]