ede-tests.el 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ;;; ede-tests.el --- Some tests for the Emacs Development Environment
  2. ;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
  3. ;; Author: Eric M. Ludlam <eric@siege-engine.com>
  4. ;; This file is part of GNU Emacs.
  5. ;; GNU Emacs is free software: you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;; GNU Emacs is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Commentary:
  16. ;; Extracted from ede-locate.el in the CEDET distribution.
  17. ;;; Code:
  18. ;;; From ede-locate:
  19. (require 'ede/locate)
  20. ;;; TESTS
  21. ;;
  22. ;; Some testing routines.
  23. (defun ede-locate-test-locate (file)
  24. "Test EDE Locate on FILE using LOCATE type.
  25. The search is done with the current EDE root."
  26. (interactive "sFile: ")
  27. (let ((loc (ede-locate-locate
  28. "test"
  29. :root (ede-project-root-directory
  30. (ede-toplevel)))))
  31. (data-debug-new-buffer "*EDE Locate ADEBUG*")
  32. (ede-locate-file-in-project loc file)
  33. (data-debug-insert-object-slots loc "]"))
  34. )
  35. (defun ede-locate-test-global (file)
  36. "Test EDE Locate on FILE using GNU Global type.
  37. The search is done with the current EDE root."
  38. (interactive "sFile: ")
  39. (let ((loc (ede-locate-global
  40. "test"
  41. :root (ede-project-root-directory
  42. (ede-toplevel)))))
  43. (data-debug-new-buffer "*EDE Locate ADEBUG*")
  44. (ede-locate-file-in-project loc file)
  45. (data-debug-insert-object-slots loc "]"))
  46. )
  47. (defun ede-locate-test-idutils (file)
  48. "Test EDE Locate on FILE using ID Utils type.
  49. The search is done with the current EDE root."
  50. (interactive "sFile: ")
  51. (let ((loc (ede-locate-idutils
  52. "test"
  53. :root (ede-project-root-directory
  54. (ede-toplevel)))))
  55. (data-debug-new-buffer "*EDE Locate ADEBUG*")
  56. (ede-locate-file-in-project loc file)
  57. (data-debug-insert-object-slots loc "]"))
  58. )
  59. (defun ede-locate-test-cscope (file)
  60. "Test EDE Locate on FILE using CScope type.
  61. The search is done with the current EDE root."
  62. (interactive "sFile: ")
  63. (let ((loc (ede-locate-cscope
  64. "test"
  65. :root (ede-project-root-directory
  66. (ede-toplevel)))))
  67. (data-debug-new-buffer "*EDE Locate ADEBUG*")
  68. (ede-locate-file-in-project loc file)
  69. (data-debug-insert-object-slots loc "]"))
  70. )
  71. ;;; ede-test.el ends here