Modify tests to support multiple arguments.

Also, update tests for --number to actually check that flag.
Previously they were checking for a '-n' tag inside an 'li' tag,
producing the empty string.
I don't think this was the intended result.
pull/81/head
Wolfgang Faust 7 years ago
parent ddf33efab8
commit 3b0097e9ed

@ -45,5 +45,5 @@ link , a
link , a sup
link , a:parent-of(sup)
link , a:parent-of(sup) sup
li --number
li -n
li --number
li -n

@ -45,5 +45,5 @@ da39a3ee5e6b4b0d3255bfef95601890afd80709 #toc li > li
0d1f66765d1632c70f8608947890524e78459362 link , a sup
b6a3d6cccd305fcc3e8bf2743c443743bdaaa02b link , a:parent-of(sup)
0d1f66765d1632c70f8608947890524e78459362 link , a:parent-of(sup) sup
da39a3ee5e6b4b0d3255bfef95601890afd80709 li --number
da39a3ee5e6b4b0d3255bfef95601890afd80709 li -n
d200756078ef79d77fb17848c5f15b85bcea7e00 li --number
d200756078ef79d77fb17848c5f15b85bcea7e00 li -n

@ -8,7 +8,7 @@ data = open("index.html", "r").read()
for line in open("cmds.txt", "r"):
line = line.strip()
p = Popen(['pup', line], stdout=PIPE, stdin=PIPE, stderr=PIPE)
p = Popen(['pup']+line.split('\t'), stdout=PIPE, stdin=PIPE, stderr=PIPE)
h = sha1()
h.update(p.communicate(input=data)[0])
print("%s %s" % (h.hexdigest(), line))

Loading…
Cancel
Save