1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

applied patch from Malcolm Tredinnick to avoid tabs in python sources,

* python/tests/*.py: applied patch from Malcolm Tredinnick
  to avoid tabs in python sources, should fix #135095
Daniel
This commit is contained in:
Daniel Veillard
2004-02-23 10:53:52 +00:00
parent 807daf8265
commit 09b792ba30
10 changed files with 59 additions and 54 deletions

View File

@@ -14,43 +14,43 @@ class callback:
self.starte = starte
self.ende = ende
self.endd = endd
self.delta = delta
self.count = 0
self.delta = delta
self.count = 0
def startDocument(self):
global ctxt
if ctxt.byteConsumed() != self.startd:
print "document start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), self.startd)
if ctxt.byteConsumed() != self.startd:
print "document start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), self.startd)
sys.exit(1)
def endDocument(self):
global ctxt
expect = self.ende + self.delta * (self.count - 1) + self.endd
if ctxt.byteConsumed() != expect:
print "document end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
expect = self.ende + self.delta * (self.count - 1) + self.endd
if ctxt.byteConsumed() != expect:
print "document end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
def startElement(self, tag, attrs):
global ctxt
if tag == "bar1":
expect = self.starte + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
if tag == "bar1":
expect = self.starte + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element start at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
def endElement(self, tag):
global ctxt
if tag == "bar1":
expect = self.ende + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
self.count = self.count + 1
if tag == "bar1":
expect = self.ende + self.delta * self.count
if ctxt.byteConsumed() != expect:
print "element end at wrong index: %d expecting %d\n" % (
ctxt.byteConsumed(), expect)
sys.exit(1)
self.count = self.count + 1
def characters(self, data):
pass