From 6d5a631d7da1a7804c2f009ca96d383c04fe9b53 Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Sat, 20 Aug 2011 13:08:13 -0400 Subject: [PATCH] Add header comments and provide. --- test/manual/cedet/cedet/semantic/utest-fw.el | 64 ++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 test/manual/cedet/cedet/semantic/utest-fw.el diff --git a/test/manual/cedet/cedet/semantic/utest-fw.el b/test/manual/cedet/cedet/semantic/utest-fw.el new file mode 100644 index 00000000000..c2d72691ba6 --- /dev/null +++ b/test/manual/cedet/cedet/semantic/utest-fw.el @@ -0,0 +1,64 @@ +;;; utest-fw.el --- +;; +;; Copyright (C) 2011 Eric M. Ludlam +;; +;; Author: Eric M. Ludlam +;; +;; 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: +;; +;; + +;;; Code: + +(defun semantic-test-data-cache () + "Test the data cache." + (interactive) + (let ((data '(a b c))) + (save-excursion + (set-buffer (get-buffer-create " *semantic-test-data-cache*")) + (erase-buffer) + (insert "The Moose is Loose") + (goto-char (point-min)) + (semantic-cache-data-to-buffer (current-buffer) (point) (+ (point) 5) + data 'moose 'exit-cache-zone) + (if (equal (semantic-get-cache-data 'moose) data) + (message "Successfully retrieved cached data.") + (error "Failed to retrieve cached data")) + ))) + +(defun semantic-test-throw-on-input () + "Test that throw on input will work." + (interactive) + (semantic-throw-on-input 'done-die) + (message "Exit Code: %s" + (semantic-exit-on-input 'testing + (let ((inhibit-quit nil) + (message-log-max nil)) + (while t + (message "Looping ... press a key to test") + (semantic-throw-on-input 'test-inner-loop)) + 'exit))) + (when (input-pending-p) + (if (fboundp 'read-event) + (read-event) + (read-char))) + ) + + +(provide 'cedet/semantic/utest-fw) + +;;; utest-fw.el ends here -- 2.39.5