Update of /project/s-xml/cvsroot/s-xml/test
In directory common-lisp.net:/tmp/cvs-serv17887/test
Modified Files:
test-lxml-dom.lisp test-xml.lisp
Log Message:
added CDATA support (patch contributed by Peter Van Eynde pvaneynd(a)mailworks.org)
Date: Sun Nov 6 13:44:49 2005
Author: scaekenberghe
Index: s-xml/test/test-lxml-dom.lisp
diff -u s-xml/test/test-lxml-dom.lisp:1.1.1.1 s-xml/test/test-lxml-dom.lisp:1.2
--- s-xml/test/test-lxml-dom.lisp:1.1.1.1 Mon Jun 7 20:49:59 2004
+++ s-xml/test/test-lxml-dom.lisp Sun Nov 6 13:44:48 2005
@@ -1,6 +1,6 @@
;;;; -*- 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
;;;;
@@ -66,5 +66,15 @@
(assert
(string-equal (print-xml-string '(:|foo| :|bar|) :input-type :lxml)
"<foo><bar/></foo>"))
+
+(assert (string-equal (second
+ (with-input-from-string (stream "<foo><![CDATA[<greeting>Hello, world!</greeting>]]></foo>")
+ (parse-xml stream :output-type :lxml)))
+ "<greeting>Hello, world!</greeting>"))
+
+(assert (string-equal (second
+ (with-input-from-string (stream "<foo><![CDATA[<greeting>Hello, < world!</greeting>]]></foo>")
+ (parse-xml stream :output-type :lxml)))
+ "<greeting>Hello, < world!</greeting>"))
;;;; eof
Index: s-xml/test/test-xml.lisp
diff -u s-xml/test/test-xml.lisp:1.2 s-xml/test/test-xml.lisp:1.3
--- s-xml/test/test-xml.lisp:1.2 Fri Oct 22 12:37:00 2004
+++ s-xml/test/test-xml.lisp Sun Nov 6 13:44:48 2005
@@ -1,6 +1,6 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: test-xml.lisp,v 1.2 2004/10/22 10:37:00 scaekenberghe Exp $
+;;;; $Id: test-xml.lisp,v 1.3 2005/11/06 12:44:48 scaekenberghe Exp $
;;;;
;;;; Unit and functional tests for xml.lisp
;;;;
@@ -36,15 +36,6 @@
(char= (with-input-from-string (stream "ABC")
(skip-whitespace stream))
#\A))
-
-;; CDATA is currently skipped
-(with-input-from-string (stream "<![CDATA[<greeting>Hello, world!</greeting>]]>")
- (start-parse-xml stream))
-
-;; unbalanced CDATA fails however (thanks to Frank Sonnemans)
-#+NIL
-(with-input-from-string (stream "<![CDATA[<greeting>Hello, < world!</greeting>]]>")
- (start-parse-xml stream))
(assert
(string-equal (with-output-to-string (stream) (print-string-xml "<foo>" stream))