diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/XPath/docs/chapters | 28 | ||||
-rw-r--r-- | test/XPath/docs/simple | 12 | ||||
-rw-r--r-- | test/XPath/expr/base | 5 | ||||
-rw-r--r-- | test/XPath/expr/functions | 5 | ||||
-rw-r--r-- | test/XPath/expr/strings | 19 | ||||
-rw-r--r-- | test/XPath/tests/chaptersbase | 7 | ||||
-rw-r--r-- | test/XPath/tests/simpleabbr | 6 | ||||
-rw-r--r-- | test/XPath/tests/simplebase | 7 |
8 files changed, 89 insertions, 0 deletions
diff --git a/test/XPath/docs/chapters b/test/XPath/docs/chapters new file mode 100644 index 00000000..bf402d15 --- /dev/null +++ b/test/XPath/docs/chapters @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<EXAMPLE prop1="gnome is great" prop2="& linux too"> + <head> + <title>Welcome to Gnome</title> + </head> + <chapter> + <title>The Linux adventure</title> + <p>bla bla bla ...</p> + <image href="linus.gif"/> + <p>...</p> + </chapter> + <chapter> + <title>Chapter 2</title> + <p>this is chapter 2 ...</p> + </chapter> + <chapter> + <title>Chapter 3</title> + <p>this is chapter 3 ...</p> + </chapter> + <chapter> + <title>Chapter 4</title> + <p>this is chapter 4 ...</p> + </chapter> + <chapter> + <title>Chapter 5</title> + <p>this is chapter 5 ...</p> + </chapter> +</EXAMPLE> diff --git a/test/XPath/docs/simple b/test/XPath/docs/simple new file mode 100644 index 00000000..ca665a24 --- /dev/null +++ b/test/XPath/docs/simple @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<EXAMPLE prop1="gnome is great" prop2="& linux too"> + <head> + <title>Welcome to Gnome</title> + </head> + <chapter> + <title>The Linux adventure</title> + <p>bla bla bla ...</p> + <image href="linus.gif"/> + <p>...</p> + </chapter> +</EXAMPLE> diff --git a/test/XPath/expr/base b/test/XPath/expr/base new file mode 100644 index 00000000..9aaed4fc --- /dev/null +++ b/test/XPath/expr/base @@ -0,0 +1,5 @@ +1 +1+2 +2*3 +1+2*3+4 +(1+2)*(3+4) diff --git a/test/XPath/expr/functions b/test/XPath/expr/functions new file mode 100644 index 00000000..d2cba4e2 --- /dev/null +++ b/test/XPath/expr/functions @@ -0,0 +1,5 @@ +true() +false() +number("1.5") +concat("titi",'toto') +concat("titi",'toto',"tata","last") diff --git a/test/XPath/expr/strings b/test/XPath/expr/strings new file mode 100644 index 00000000..299b3007 --- /dev/null +++ b/test/XPath/expr/strings @@ -0,0 +1,19 @@ +string(5) +string(0.5) +string(-0.5) +string(true()) +string(false()) +concat("titi","toto") +concat("titi","toto","tata") +starts-with("tititoto","titi") +starts-with("tititoto","to") +contains("tititototata","titi") +contains("tititototata","toto") +contains("tititototata","tata") +contains("tititototata","tita") +substring("12345",2,3) +substring("12345",2) +substring("12345",1.5,2.6) +substring("12345",0,3) +string-length("") +string-length("titi") diff --git a/test/XPath/tests/chaptersbase b/test/XPath/tests/chaptersbase new file mode 100644 index 00000000..997d8c86 --- /dev/null +++ b/test/XPath/tests/chaptersbase @@ -0,0 +1,7 @@ +/child::head +/child::* +/child::head/child::title +/child::head/child::title/child::text() +/child::head/node() +/descendant::title +/descendant::p/ancestor::chapter diff --git a/test/XPath/tests/simpleabbr b/test/XPath/tests/simpleabbr new file mode 100644 index 00000000..b4431229 --- /dev/null +++ b/test/XPath/tests/simpleabbr @@ -0,0 +1,6 @@ +/chapter[1] +//p +//chapter/image +//p/text() +//p/text()[position()=1] +//p/text()[position()=last()] diff --git a/test/XPath/tests/simplebase b/test/XPath/tests/simplebase new file mode 100644 index 00000000..997d8c86 --- /dev/null +++ b/test/XPath/tests/simplebase @@ -0,0 +1,7 @@ +/child::head +/child::* +/child::head/child::title +/child::head/child::title/child::text() +/child::head/node() +/descendant::title +/descendant::p/ancestor::chapter |