[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests bc36c86 075/316: Add header comm
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests bc36c86 075/316: Add header comments and provide. |
Date: |
Fri, 27 Jan 2017 20:03:29 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit bc36c86b7b21abf9649b2c3299d9cea6bc4d1637
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>
Add header comments and provide.
---
test/manual/cedet/pulse-utest.el | 78 ++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/test/manual/cedet/pulse-utest.el b/test/manual/cedet/pulse-utest.el
new file mode 100644
index 0000000..6d838f2
--- /dev/null
+++ b/test/manual/cedet/pulse-utest.el
@@ -0,0 +1,78 @@
+;;; pulse-utest.el --- Tests for Pulse.
+;;
+;; Copyright (C) 2011 Eric M. Ludlam
+;;
+;; Author: Eric M. Ludlam <address@hidden>
+;;
+;; 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 of the
+;; License, 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. If not, see http://www.gnu.org/licenses/.
+
+
+;;; Commentary:
+;;
+;;
+
+(require 'pulse)
+
+;;; Code:
+
+(defun pulse-test (&optional no-error)
+ "Test the lightening function for pulsing a line.
+When optional NO-ERROR Don't throw an error if we can't run tests."
+ (interactive)
+ (if (or (not pulse-flag) (not (pulse-available-p)))
+ (if no-error
+ nil
+ (error (concat "Pulse test only works on versions of Emacs"
+ " that support pulsing")))
+ ;; Run the tests
+ (when (cedet-called-interactively-p)
+ (message "<Press a key> Pulse one line.")
+ (read-char))
+ (pulse-momentary-highlight-one-line (point))
+ (when (cedet-called-interactively-p)
+ (message "<Press a key> Pulse a region.")
+ (read-char))
+ (pulse-momentary-highlight-region (point)
+ (save-excursion
+ (condition-case nil
+ (forward-char 30)
+ (error nil))
+ (point)))
+ (when (cedet-called-interactively-p)
+ (message "<Press a key> Pulse line a specific color.")
+ (read-char))
+ (pulse-momentary-highlight-one-line (point) 'modeline)
+ (when (cedet-called-interactively-p)
+ (message "<Press a key> Pulse a pre-existing overlay.")
+ (read-char))
+ (let* ((start (point-at-bol))
+ (end (save-excursion
+ (end-of-line)
+ (when (not (eobp))
+ (forward-char 1))
+ (point)))
+ (o (pulse-make-overlay start end))
+ )
+ (pulse-momentary-highlight-overlay o)
+ (if (pulse-overlay-live-p o)
+ (pulse-overlay-delete o)
+ (error "Non-temporary overlay was deleted!"))
+ )
+ (when (cedet-called-interactively-p)
+ (message "Done!"))))
+
+
+(provide 'pulse-utest)
+
+;;; pulse.el ends here
- [Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh: Add support for running in batch mode., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests c9de94f 064/316: * cit-test.sh: Add support for running in batch mode., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests d8f7f9c 066/316: * tests/cit-test.sh: Fix filename for integration test., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6f0f898 065/316: * cedet-load.el: Load cogre autoloads., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 8e1fe2d 067/316: Accept any potential project directory during testing, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 83c8dc0 068/316: Use random temporary directory for integration tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 66b117d 071/316: Test files contributed by Barry OReilly, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests feb2025 074/316: Don't check contents after initial fil, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 5812c59 073/316: Remove obsolete cvs-auto-updated 'X-RCS' line., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 2cfef8f 048/316: Add test files, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests dd9777f 076/316: Fix interactive unit tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bc36c86 075/316: Add header comments and provide.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 4ec19b7 083/316: Test src file for a dirmatch., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 89e6966 077/316: Remove compatibility function `cedet-called-interactively-p'., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 4fe7a1c 085/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6b4b0a5 078/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 3739238 086/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 19ad5c7 095/316: Merge from 1.0pre6 branch, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 217feb1 080/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9641120 108/316: Fake configure.in for project detection purposes., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 85a3b5a 106/316: (cit): Add "cit-projvar.el"., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests adc318b 115/316: New test file., Edward John Steere, 2017/01/27