import translationbackends as tb
# should become 5 segments for 100 chars each
text = """
Aaaaaaaaaaaaaaaaaaaa Bbbbbbbbbbbbbbbbbbb Ccccccccccccccccccc Ddddddddddddddddddd Eeeeeeeeeeeeeeeeeexxx.
Aaaaaaaaaaaaaaaaaaa Bbbbbbbbbbbbbbbbbb Cccccccccccccccccc Dddddddddddddddddd Eeeeeeeeeeeeeeeee.
Aaaaaaaaaaaaaaaaaaaa Bbbbbbbbbbbbbbbbbbb Ccccccccccccccccccc Ddddddddddddddddddd Eeeeeeeeeeeeeee.
Aaaaaaaaaaaaaaaaaaaa Bbbbbbbbbbbbbbbbbbb Ccccccccccccccccccc Ddddddddddddddddddd Eeeeeeeeeeeeeeee.
"""
class CountSnips(tb.BackendUtils):
max_len = 100
result = []
def fetch(self, snip):
self.result.append(snip)
return snip
def run():
t = CountSnips(lang="none")
t.translate(text)
print(t.result)
assert len(t.result) == 5
def streusselkuchen():
rx = tb.rx.split(500)
print(rx)
print(rx.findall("streusselkuchen"))