File: test.sh

package info (click to toggle)
pyxb 1.2.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 42,668 kB
  • sloc: python: 239,437; sh: 905; xml: 690; makefile: 60
file content (25 lines) | stat: -rwxr-xr-x 731 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

: ${PYXB_TEST_ROOT:=${PYXB_ROOT}/tests}
. ${PYXB_TEST_ROOT}/support.sh

TEST_URI=http://www.w3.org/People/mimasa/test/xhtml/media-types/test.xhtml

if [ ! -f in.xhtml ] ; then
  wget -O in.xhtml ${TEST_URI} || fail retrieving document
fi
python rewrite.py || fail rewriting document

xmllint --format in.xhtml > inf.xhtml
xmllint --format out.xhtml > outf.xhtml
diff -uw inf.xhtml outf.xhtml > deltas || true

# Need to manually validate that outf.xhtml and in.xhtml are about the
# same.  The rewrite does not preserve the order of attributes in the
# elements.
echo "See deltas for differences"

# Test most primitive generation of documents
rm -f genout.xhtml
python generate.py > genout.xhtml || fail running
passed