From: zappo Date: Sun, 24 Feb 2008 02:58:59 +0000 (+0000) Subject: Texinfo support for cedet integration tests. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=41aebbca2d4d7fc10b4a575363c194c9f82df1cf;p=emacs.git Texinfo support for cedet integration tests. --- diff --git a/test/manual/cedet/cit-texi.el b/test/manual/cedet/cit-texi.el new file mode 100644 index 00000000000..6d7d403beb7 --- /dev/null +++ b/test/manual/cedet/cit-texi.el @@ -0,0 +1,96 @@ +;;; cit-texi.el --- testing Texinfo support. + +;; Copyright (C) 2008 Eric M. Ludlam + +;; Author: Eric M. Ludlam +;; X-RCS: $Id: cit-texi.el,v 1.1 2008-02-24 02:58:59 zappo Exp $ + +;; 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 2, 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; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; Texinfo srecode/semantic testing. + +;;; Code: + +(defconst cit-doc-tags + (list + (semantic-tag-new-variable "cit-spiffy-var" nil + "'(1 2 3 4)") + (semantic-tag-new-function + "RegularFunction" nil + (list (semantic-tag-new-variable "arg1" "nil")) + :documentation "Some boring old function.") + + ) + "List of tags to insert into a texinfo document.") + +(defconst cit-section-tags + (list + (semantic-tag + "@value{TITLE}" 'section + :members + (list + (semantic-tag "cit-spiffy-var" 'def) + (semantic-tag "RegularFunction" 'def) + + (semantic-tag + "About Foo" 'section + :members + (list + (semantic-tag "Sub About Foo" 'section))) + + (semantic-tag "Index" 'section) + )) + ) + "Eventual tags we expect.") + +(defun cit-srecode-fill-texi () + "Fill up a base set of files with some base tags." + (interactive) + + ;; 2 b) Test various templates. + + (cit-srecode-fill-with-stuff "src/foodoc.texi" cit-doc-tags + "NAME" "All about the FOO.") + + (re-search-forward "@menu\n") + (sit-for 0) + (srecode-texi-add-menu "About Foo") + (sit-for 0) + + (srecode-semantic-insert-tag (semantic-tag "" 'menu)) + (sit-for 0) + + (srecode-texi-add-menu "Sub About Foo") + (sit-for 0) + + (save-buffer) + + (cit-srecode-verify-tags (semantic-fetch-tags) + cit-section-tags) + + ;; 1 e) Tell EDE where the srcs are + (ede-new-target "Doc" "info" "n") + (ede-add-file "Doc") + + (cit-compile-and-wait) + ) + + + +(provide 'cit-texi) +;;; cit-texi.el ends here