sxml.match.test 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ;;;; sxml.simple.test --- (sxml simple) -*- mode: scheme; coding: utf-8; -*-
  2. ;;;;
  3. ;;;; Copyright (C) 2010, 2012 Free Software Foundation, Inc.
  4. ;;;;
  5. ;;;; This library is free software; you can redistribute it and/or
  6. ;;;; modify it under the terms of the GNU Lesser General Public
  7. ;;;; License as published by the Free Software Foundation; either
  8. ;;;; version 3 of the License, or (at your option) any later version.
  9. ;;;;
  10. ;;;; This library is distributed in the hope that it will be useful,
  11. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. ;;;; Lesser General Public License for more details.
  14. ;;;;
  15. ;;;; You should have received a copy of the GNU Lesser General Public
  16. ;;;; License along with this library; if not, write to the Free Software
  17. ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. (define-module (test-sxml-match)
  19. #:use-module (test-suite lib)
  20. #:use-module (sxml match))
  21. (define-syntax run-test
  22. (syntax-rules ()
  23. ((_ desc test expected-result)
  24. (pass-if desc (equal? test expected-result)))))
  25. ;;;
  26. ;;; Include upstream source file.
  27. ;;;
  28. ;; This file was taken unmodified from
  29. ;; <http://planet.plt-scheme.org/package-source/jim/sxml-match.plt/1/1/> on
  30. ;; 2010-05-24. It was written by Jim Bender <benderjg2@aol.com> and released
  31. ;; under the MIT/X11 license
  32. ;; <http://www.gnu.org/licenses/license-list.html#X11License>.
  33. ;;
  34. ;; It was modified to remove the `#lang' and `require' forms as well as the
  35. ;; `run-test' macro, replaced by the one above.
  36. ;;
  37. ;; FIXME: The `xyzpq' variable in there is originally named `x' but using that
  38. ;; name triggers a psyntax "identifier out of context" error.
  39. (include-from-path "tests/sxml-match-tests.ss")