summaryrefslogtreecommitdiff
path: root/test/fs.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs.py')
-rw-r--r--test/fs.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/fs.py b/test/fs.py
index a025ec47..8047273d 100644
--- a/test/fs.py
+++ b/test/fs.py
@@ -836,6 +836,15 @@ def odd_paths(binary):
pass
assert client.read('/index'), (where, line)
client.write('/ctl', b'DumpDir\n')
+ # A theme file that is not there, or no theme, fails the write.
+ (root / 'bad.zon').write_bytes(b'.{ .nonsense = 1 }')
+ for line, why in ((f'ThemeFile {root}/missing.zon', 'theme file'), (f'ThemeFile {root}/bad.zon', 'theme file'),
+ ('ThemeFile notes.txt', 'a theme file is a .zon')):
+ try:
+ client.write('/ctl', (line + '\n').encode())
+ raise AssertionError(f'{line} was taken')
+ except OSError as refused:
+ assert why in str(refused), (line, refused)
def cut_writes(binary):