[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 254/287: Add test for begining and ending of line
From: |
Matthew Fidler |
Subject: |
[elpa] 254/287: Add test for begining and ending of line |
Date: |
Wed, 02 Jul 2014 14:46:27 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 22a9650d3b116f1d50cf282a15b9a269111a3a5b
Author: Matthew L. Fidler <address@hidden>
Date: Sun Jun 29 23:09:43 2014 -0500
Add test for begining and ending of line
---
ergoemacs-test.el | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index ea88647..cc7c0ef 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -968,7 +968,42 @@ Selected mark would not be cleared after paste."
(when (file-exists-p w-file)
(delete-file w-file))))
-
+(ert-deftest ergoemacs-test-bol-or-what ()
+ "Test beginning of line functionality."
+ (let ((ergoemacs-end-of-comment-line t)
+ (ergoemacs-back-to-indentation t))
+ (with-temp-buffer
+ (emacs-lisp-mode) ; Turn on ergoemacs-mode
+ (insert "(progn\n (ergoemacs-mode 1)) ; Turn on ergoemacs-mode")
+ (goto-char (point-max))
+ (call-interactively 'ergoemacs-beginning-of-line-or-what)
+ (should (string= "Turn on ergoemacs-mode"
+ (buffer-substring (point) (point-at-eol))))
+ (call-interactively 'ergoemacs-beginning-of-line-or-what)
+ (should (string= " ; Turn on ergoemacs-mode"
+ (buffer-substring (point) (point-at-eol))))
+ (call-interactively 'ergoemacs-beginning-of-line-or-what)
+ (should (string= "(ergoemacs-mode 1)) ; Turn on ergoemacs-mode"
+ (buffer-substring (point) (point-at-eol))))
+ (call-interactively 'ergoemacs-beginning-of-line-or-what)
+ (should (string= " (ergoemacs-mode 1)) ; Turn on ergoemacs-mode"
+ (buffer-substring (point) (point-at-eol)))))))
+
+(ert-deftest ergoemacs-test-eol-or-what ()
+ "Test beginning of line functionality."
+ (let ((ergoemacs-end-of-comment-line t)
+ (ergoemacs-back-to-indentation t))
+ (with-temp-buffer
+ (emacs-lisp-mode) ; Turn on ergoemacs-mode
+ (insert "(progn\n (ergoemacs-mode 1)) ; Turn on ergoemacs-mode")
+ (goto-char (point-max))
+ (beginning-of-line)
+
+ (call-interactively 'ergoemacs-end-of-line-or-what)
+ (should (string= " ; Turn on ergoemacs-mode"
+ (buffer-substring (point) (point-at-eol))))
+ (call-interactively 'ergoemacs-end-of-line-or-what)
+ (should (= (point) (point-at-eol))))))
(provide 'ergoemacs-test)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [elpa] 255/287: Make beginning/end of line work without font-lock, (continued)
- [elpa] 255/287: Make beginning/end of line work without font-lock, Matthew Fidler, 2014/07/02
- [elpa] 253/287: Another fix for end of line or what, Matthew Fidler, 2014/07/02
- [elpa] 257/287: Fix byte-compile errors, Matthew Fidler, 2014/07/02
- [elpa] 250/287: Comment out autopair; needs to go in options menu..., Matthew Fidler, 2014/07/02
- [elpa] 256/287: Add version information for themes, Matthew Fidler, 2014/07/02
- [elpa] 251/287: Modify copy-line-or-region to work with `org-mode`, Matthew Fidler, 2014/07/02
- [elpa] 258/287: Silence customize save with batch emacs., Matthew Fidler, 2014/07/02
- [elpa] 252/287: sort layouts alphabetically, Matthew Fidler, 2014/07/02
- [elpa] 260/287: Make sure `ergoemacs-hook-functions` is non-nil, Matthew Fidler, 2014/07/02
- [elpa] 259/287: Move saving last closed buffer to ergoemacs-theme, Matthew Fidler, 2014/07/02
- [elpa] 254/287: Add test for begining and ending of line,
Matthew Fidler <=
- [elpa] 264/287: fix a typo, Matthew Fidler, 2014/07/02
- [elpa] 268/287: Run all ergoemacs- tests, Matthew Fidler, 2014/07/02
- [elpa] 265/287: More Robust ergoemacs-end-of-line-or-what (passes noninteractive test), Matthew Fidler, 2014/07/02
- [elpa] 269/287: Add autoload cookie to ergoemacs-test-layout, Matthew Fidler, 2014/07/02
- [elpa] 266/287: Make apps-copy test use C-a, Matthew Fidler, 2014/07/02
- [elpa] 267/287: Move ergoemacs-hook-functions to prevent warnings, Matthew Fidler, 2014/07/02
- [elpa] 263/287: Remove condition-case handler, Matthew Fidler, 2014/07/02
- [elpa] 261/287: Make sure to include the ending new-line when copying an empty line, Matthew Fidler, 2014/07/02
- [elpa] 273/287: Slight bug fix for beginning-of-line-or-what, Matthew Fidler, 2014/07/02
- [elpa] 274/287: add eo and eo-displaced, Matthew Fidler, 2014/07/02