Commit 194cceaf authored by Sven Van Caekenberghe's avatar Sven Van Caekenberghe
Browse files

patch contributed by Gismo / Luca Capello:

- splitted source code files from test in test and examples directory
- added s-xml.test asdf to compile/load the tests
- added s-xml.examples to compile/load the examples
- modified path references in the test code to use the asdf location
parent fce5cb88
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: counter.lisp,v 1.1.1.1 2004/06/07 18:49:59 scaekenberghe Exp $
;;;; $Id: counter.lisp,v 1.2 2004/06/11 11:14:43 scaekenberghe Exp $
;;;;
;;;; A simple SSAX counter example that can be used as a performance test
;;;;
......
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: xml.lisp,v 1.6 2005/01/24 10:03:09 scaekenberghe Exp $
;;;; $Id: echo.lisp,v 1.1 2005/08/17 13:44:30 scaekenberghe Exp $
;;;;
;;;; A simple example as well as a useful tool: parse, echo and pretty print XML
;;;;
......
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: lxml-dom.lisp,v 1.1.1.1 2004/06/07 18:49:56 scaekenberghe Exp $
;;;; $Id: remove-markup.lisp,v 1.1 2004/06/11 11:14:43 scaekenberghe Exp $
;;;;
;;;; Remove markup from an XML document using the SSAX interface
;;;;
......
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: tracer.lisp,v 1.1 2004/06/11 08:20:58 scaekenberghe Exp $
;;;; $Id: tracer.lisp,v 1.2 2004/06/11 11:14:43 scaekenberghe Exp $
;;;;
;;;; A simple SSAX tracer example that can be used to understand how the hooks are called
;;;;
......
;;;; -*- Mode: LISP -*-
;;;;
;;;; $Id: s-xml.asd,v 1.1.1.1 2004/06/07 18:49:56 scaekenberghe Exp $
;;;; $Id: s-xml.asd,v 1.2 2005/12/14 21:49:04 scaekenberghe Exp $
;;;;
;;;; The S-XML ASDF system definition
;;;;
......@@ -31,4 +31,19 @@
(:file "sxml-dom" :depends-on ("dom"))
(:file "xml-struct-dom" :depends-on ("dom"))))))
(defsystem :s-xml.test
:depends-on (:s-xml)
:components ((:module :test
:components ((:file "test-xml")
(:file "test-xml-struct-dom")
(:file "test-lxml-dom")
(:file "test-sxml-dom")))))
(defsystem :s-xml.examples
:depends-on (:s-xml)
:components ((:module :examples
:components ((:file "counter")
(:file "echo")
(:file "remove-markup")
(:file "tracer")))))
;;;; eof
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: all-tests.lisp,v 1.1 2003/03/25 15:31:18 sven Exp $
;;;;
;;;; Load and execute all unit and functional tests
;;;;
;;;; Copyright (C) 2002, 2004 Sven Van Caekenberghe, Beta Nine BVBA.
;;;;
;;;; You are granted the rights to distribute and use this software
;;;; as governed by the terms of the Lisp Lesser General Public License
;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
(load (merge-pathnames "test-xml" *load-pathname*) :verbose t)
(load (merge-pathnames "test-xml-struct-dom" *load-pathname*) :verbose t)
(load (merge-pathnames "test-lxml-dom" *load-pathname*) :verbose t)
(load (merge-pathnames "test-sxml-dom" *load-pathname*) :verbose t)
;;;; eof
\ No newline at end of file
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: test-lxml-dom.lisp,v 1.1.1.1 2004/06/07 18:49:59 scaekenberghe Exp $
;;;; $Id: test-lxml-dom.lisp,v 1.2 2005/11/06 12:44:48 scaekenberghe Exp $
;;;;
;;;; Unit and functional tests for lxml-dom.lisp
;;;;
......@@ -40,15 +40,21 @@
" text, with a leading & trailing space ")))
(assert
(consp (parse-xml-file (merge-pathnames "xhtml-page.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/xhtml-page.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :lxml)))
(assert
(consp (parse-xml-file (merge-pathnames "ant-build-file.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/ant-build-file.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :lxml)))
(assert
(consp (parse-xml-file (merge-pathnames "plist.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/plist.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :lxml)))
(assert
......@@ -77,4 +83,4 @@
(parse-xml stream :output-type :lxml)))
"<greeting>Hello, < world!</greeting>"))
;;;; eof
\ No newline at end of file
;;;; eof
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: test-sxml-dom.lisp,v 1.2 2003/06/05 12:50:18 sven Exp $
;;;; $Id: test-sxml-dom.lisp,v 1.1.1.1 2004/06/07 18:49:59 scaekenberghe Exp $
;;;;
;;;; Unit and functional tests for sxml-dom.lisp
;;;;
......@@ -40,15 +40,21 @@
" text, with a leading & trailing space ")))
(assert
(consp (parse-xml-file (merge-pathnames "xhtml-page.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/xhtml-page.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :sxml)))
(assert
(consp (parse-xml-file (merge-pathnames "ant-build-file.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/ant-build-file.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :sxml)))
(assert
(consp (parse-xml-file (merge-pathnames "plist.xml" *load-pathname*)
(consp (parse-xml-file (merge-pathnames "test/plist.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :sxml)))
(assert
......
;;;; -*- mode: lisp -*-
;;;;
;;;; $Id: test-xml-struct-dom.lisp,v 1.1.1.1 2004/06/07 18:49:59 scaekenberghe Exp $
;;;; $Id: test-xml-struct-dom.lisp,v 1.2 2005/08/29 15:01:49 scaekenberghe Exp $
;;;;
;;;; Unit and functional tests for xml-struct-dom.lisp
;;;;
......@@ -44,15 +44,21 @@
" text, with a leading & trailing space "))))
(assert
(xml-element-p (parse-xml-file (merge-pathnames "xhtml-page.xml" *load-pathname*)
(xml-element-p (parse-xml-file (merge-pathnames "test/xhtml-page.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :xml-struct)))
(assert
(xml-element-p (parse-xml-file (merge-pathnames "ant-build-file.xml" *load-pathname*)
(xml-element-p (parse-xml-file (merge-pathnames "test/ant-build-file.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :xml-struct)))
(assert
(xml-element-p (parse-xml-file (merge-pathnames "plist.xml" *load-pathname*)
(xml-element-p (parse-xml-file (merge-pathnames "test/plist.xml"
(asdf:component-pathname
(asdf:find-system :s-xml.test)))
:output-type :xml-struct)))
(assert
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment