summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>1999-10-14 09:10:25 +0000
committerDaniel Veillard <veillard@src.gnome.org>1999-10-14 09:10:25 +0000
commit7c1206fc060fd4260f7c6f003c32fbbea3e542fd (patch)
tree355843d626573307ace64a03b5e3aa34971b3f2a /test
parent7d2c276a65a077932bbe2ae5a1b3af304175f995 (diff)
downloadlibxml2-7c1206fc060fd4260f7c6f003c32fbbea3e542fd.tar.gz
Revamped HTML parsing, lots of bug fixes for HTML stuff,
Added xmlValidGetValidElements and xmlValidGetPotentialChildren, Completed and cleaned up the tests, Added doc for new modules gnome-xml-xmlmemory.html and gnome-xml-nanohttp.html, Daniel
Diffstat (limited to 'test')
-rw-r--r--test/HTML/liclose.html13
-rw-r--r--test/HTML/reg1.html10
-rw-r--r--test/HTML/reg2.html12
-rw-r--r--test/HTML/reg3.html13
-rw-r--r--test/HTML/reg4.html12
-rw-r--r--test/XPath/docs/id28
-rw-r--r--test/XPath/expr/compare24
-rw-r--r--test/XPath/expr/equality25
-rw-r--r--test/comment.xml6
-rw-r--r--test/comment2.xml6
-rw-r--r--test/ns4
-rw-r--r--test/ns23
-rw-r--r--test/ns33
-rw-r--r--test/ns42
-rw-r--r--test/pi.xml6
-rw-r--r--test/pi2.xml6
16 files changed, 173 insertions, 0 deletions
diff --git a/test/HTML/liclose.html b/test/HTML/liclose.html
new file mode 100644
index 00000000..73640344
--- /dev/null
+++ b/test/HTML/liclose.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+ <title></title>
+</head>
+<body>
+<ul>
+<li>First item
+<li>Second item, closes the first one
+</ul>
+
+</html>
diff --git a/test/HTML/reg1.html b/test/HTML/reg1.html
new file mode 100644
index 00000000..ecdd007f
--- /dev/null
+++ b/test/HTML/reg1.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title>Regression test 1</title>
+</head>
+<body>
+<h1>Regression test 1</h1>
+<p>
+Ok file no problem
+</body>
+</html>
diff --git a/test/HTML/reg2.html b/test/HTML/reg2.html
new file mode 100644
index 00000000..7145c194
--- /dev/null
+++ b/test/HTML/reg2.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<title>Regression test 2</title>
+</head>
+<body>
+<h1>Regression test 2</h1>
+<p>
+Autoclose of tag P
+<p>
+Ok file no problem
+</body>
+</html>
diff --git a/test/HTML/reg3.html b/test/HTML/reg3.html
new file mode 100644
index 00000000..014483ba
--- /dev/null
+++ b/test/HTML/reg3.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>Regression test 3</title>
+</head>
+<body>
+<h1>Regression test 3</h1>
+<p>
+Autoclose of tag P
+<hr>
+<p>
+Ok file no problem
+</body>
+</html>
diff --git a/test/HTML/reg4.html b/test/HTML/reg4.html
new file mode 100644
index 00000000..7d04ca23
--- /dev/null
+++ b/test/HTML/reg4.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+<title>Regression test 4</title>
+</head>
+<body>
+<h1>Regression test 4</h1>
+<p>
+Wrong close of tag P
+<hr>
+</p>
+</body>
+</html>
diff --git a/test/XPath/docs/id b/test/XPath/docs/id
new file mode 100644
index 00000000..4b6659ff
--- /dev/null
+++ b/test/XPath/docs/id
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<EXAMPLE id="root" prop1="gnome is great" prop2="&amp; linux too">
+ <head id="head">
+ <title>Welcome to Gnome</title>
+ </head>
+ <chapter id="chapter1">
+ <title>The Linux adventure</title>
+ <p>bla bla bla ...</p>
+ <image href="linus.gif"/>
+ <p>...</p>
+ </chapter>
+ <chapter id="chapter2">
+ <title>Chapter 2</title>
+ <p>this is chapter 2 ...</p>
+ </chapter>
+ <chapter id="chapter3">
+ <title>Chapter 3</title>
+ <p>this is chapter 3 ...</p>
+ </chapter>
+ <chapter id="chapter4">
+ <title>Chapter 4</title>
+ <p>this is chapter 4 ...</p>
+ </chapter>
+ <chapter id="chapter5">
+ <title>Chapter 5</title>
+ <p>this is chapter 5 ...</p>
+ </chapter>
+</EXAMPLE>
diff --git a/test/XPath/expr/compare b/test/XPath/expr/compare
new file mode 100644
index 00000000..81b26322
--- /dev/null
+++ b/test/XPath/expr/compare
@@ -0,0 +1,24 @@
+0<1
+0<=1
+0>1
+0>=1
+1<0
+1<=0
+1>0
+1>=0
+1<1
+1<=1
+1>1
+1>=1
+'0'<1
+'0'<=1
+'0'>1
+'0'>=1
+0<'1.2'
+0<='1.2'
+0>'1.2'
+0>='1.2'
+false()<1
+false()<=1
+0>true()
+0>=true()
diff --git a/test/XPath/expr/equality b/test/XPath/expr/equality
new file mode 100644
index 00000000..2a8c84fc
--- /dev/null
+++ b/test/XPath/expr/equality
@@ -0,0 +1,25 @@
+1=1
+1!=1
+1=0
+1!=0
+true()=true()
+true()!=true()
+true()=false()
+false()!=true()
+'test'='test'
+'test'!='test'
+'test2'='test'
+'test2'!='test'
+false()=0
+false()!=0
+false()=1
+false()!=1
+0=true()
+0!=true()
+1=true()
+1!=true()
+true()='test'
+false()='test'
+'test'!=true()
+'test'!=false()
+
diff --git a/test/comment.xml b/test/comment.xml
new file mode 100644
index 00000000..98c5effd
--- /dev/null
+++ b/test/comment.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+<!-- document start -->
+<empty/>
+<!-- document end -->
+</doc>
diff --git a/test/comment2.xml b/test/comment2.xml
new file mode 100644
index 00000000..9e122ecf
--- /dev/null
+++ b/test/comment2.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!-- document start -->
+<doc>
+<empty/>
+</doc>
+<!-- document end -->
diff --git a/test/ns b/test/ns
new file mode 100644
index 00000000..94b927e5
--- /dev/null
+++ b/test/ns
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+ <dia:diagramdata dia:testattr="test"/>
+</dia:diagram>
diff --git a/test/ns2 b/test/ns2
new file mode 100644
index 00000000..80aaf945
--- /dev/null
+++ b/test/ns2
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"
+ dia:testattr="test"/>
diff --git a/test/ns3 b/test/ns3
new file mode 100644
index 00000000..76bb20d4
--- /dev/null
+++ b/test/ns3
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<dia:diagram dia:testattr="test"
+ xmlns:dia="http://www.lysator.liu.se/~alla/dia/"/>
diff --git a/test/ns4 b/test/ns4
new file mode 100644
index 00000000..136bf923
--- /dev/null
+++ b/test/ns4
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<diagram testattr="test" xml:lang="en" xml:link="simple" xml:space="preserve"/>
diff --git a/test/pi.xml b/test/pi.xml
new file mode 100644
index 00000000..48c7ff04
--- /dev/null
+++ b/test/pi.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<doc>
+<?document-start doc?>
+<empty/>
+<?document-end doc?>
+</doc>
diff --git a/test/pi2.xml b/test/pi2.xml
new file mode 100644
index 00000000..710d51c9
--- /dev/null
+++ b/test/pi2.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<?document-start doc?>
+<doc>
+<empty/>
+</doc>
+<?document-end doc?>