summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/monkey9p.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/monkey9p.py b/test/monkey9p.py
index 89751145..64b82832 100644
--- a/test/monkey9p.py
+++ b/test/monkey9p.py
@@ -698,8 +698,13 @@ def allowances(res, path, data, sizes, room):
(acme's xfid.c:842) or run as the Look builtin; an Edit block whose text
never ended runs, and fails, at the close."""
base = path.rsplit('/', 1)[-1]
- lines = [line for line in served_lines(data, sizes, room) if line.strip()]
- if base in ('look', 'event'):
+ served = served_lines(data, sizes, room)
+ lines = [line for line in served if line.strip()]
+ if base == 'look':
+ # A look's line is its text, blanks and all: one of blanks alone
+ # is a look too (fs.md); only an empty one (or a lone \r) is none.
+ n = len([line for line in served if line.rstrip(b'\r')])
+ elif base == 'event':
n = len(lines)
elif base in ('exec', 'ctl', 'tagexec'):
n = sum(1 for line in lines if line.split()[:1] == [b'Look'])