generated from sethub/template
[libxml2]Add libxml2 library
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
base
|
||||
cd //e
|
||||
base
|
||||
cd .//img
|
||||
base
|
||||
exit
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<doc>
|
||||
<e xml:base="http://example.com/base/">
|
||||
<images xml:base="images/">
|
||||
<img href="img1.gif"/>
|
||||
</images>
|
||||
</e>
|
||||
</doc>
|
||||
@@ -0,0 +1,7 @@
|
||||
base
|
||||
cd //e
|
||||
base
|
||||
cd .//img
|
||||
base
|
||||
exit
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<doc>
|
||||
<e xml:base="html/">
|
||||
<images xml:base="../images/">
|
||||
<img href="img1.gif"/>
|
||||
</images>
|
||||
</e>
|
||||
</doc>
|
||||
@@ -0,0 +1,6 @@
|
||||
cd a/b
|
||||
set <a:c/>
|
||||
xpath //*[namespace-uri()="foo"]
|
||||
This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_command_please_dont_crash foo
|
||||
set Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_profound_emotion_and_every_grand_aspiration_that_propels_our_species_ever_onward_through_the_relentless_currents_of_time_and_existence
|
||||
save -
|
||||
@@ -0,0 +1 @@
|
||||
<a xmlns:a="bar"><b xmlns:a="foo"/></a>
|
||||
@@ -0,0 +1,2 @@
|
||||
set <b/>
|
||||
save -
|
||||
@@ -0,0 +1 @@
|
||||
<a>foo</a>
|
||||
@@ -0,0 +1,5 @@
|
||||
cd *
|
||||
xpath //*[namespace-uri()="bar"]
|
||||
set <b/>
|
||||
xpath //*[namespace-uri()="bar"]
|
||||
save -
|
||||
@@ -0,0 +1 @@
|
||||
<a xmlns="bar">foo</a>
|
||||
@@ -0,0 +1,4 @@
|
||||
cd a/b
|
||||
set <a:c/>
|
||||
xpath //*[namespace-uri()="foo"]
|
||||
save -
|
||||
@@ -0,0 +1 @@
|
||||
<a xmlns:a="bar"><b xmlns:a="foo"/></a>
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "## Scripts regression tests"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
xmllint=$1
|
||||
else
|
||||
xmllint=./xmllint
|
||||
fi
|
||||
|
||||
exitcode=0
|
||||
|
||||
for i in test/scripts/*.script ; do
|
||||
name=$(basename $i .script)
|
||||
xml="./test/scripts/$name.xml"
|
||||
|
||||
if [ -f $xml ] ; then
|
||||
if [ ! -f result/scripts/$name ] ; then
|
||||
echo "New test file $name"
|
||||
|
||||
$xmllint --shell $xml < $i \
|
||||
> result/scripts/$name \
|
||||
2> result/scripts/$name.err
|
||||
else
|
||||
$xmllint --shell $xml < $i > shell.out 2> shell.err || true
|
||||
|
||||
if [ -f result/scripts/$name.err ]; then
|
||||
resulterr="result/scripts/$name.err"
|
||||
else
|
||||
resulterr=/dev/null
|
||||
fi
|
||||
|
||||
log=$(
|
||||
diff -u result/scripts/$name shell.out || true;
|
||||
diff -u $resulterr shell.err || true
|
||||
)
|
||||
|
||||
if [ -n "$log" ] ; then
|
||||
echo $name result
|
||||
echo "$log"
|
||||
exitcode=1
|
||||
fi
|
||||
|
||||
rm shell.out shell.err
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit $exitcode
|
||||
@@ -0,0 +1,2 @@
|
||||
whereis //*
|
||||
whereis //@*
|
||||
@@ -0,0 +1,18 @@
|
||||
<d:doc xmlns:d="urn:d" xmlns:e="urn:e">
|
||||
<a/><b/>
|
||||
<a/><c/>
|
||||
<a/>
|
||||
<a>
|
||||
<e:e/>
|
||||
<e:e/><b/>
|
||||
<e:e/>
|
||||
<e:e/>
|
||||
<e:e xmlns="urn:g">
|
||||
<x/>
|
||||
<x/>
|
||||
<x e:attr="val"/>
|
||||
</e:e>
|
||||
<e:e/>
|
||||
</a>
|
||||
<a/>
|
||||
</d:doc>
|
||||
Reference in New Issue
Block a user