summaryrefslogtreecommitdiff
path: root/subplot/data.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-26 10:25:59 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-26 10:27:33 +0200
commit96831d81fefcb76f2b33bc97b6206f594a7fcd5f (patch)
tree912d4d1efbd2b9088af1769ed3c5f927b09fe0bd /subplot/data.py
parent2f95edc25f127fd5ac1fb9df96bf8489dbece3ec (diff)
downloadobnam2-96831d81fefcb76f2b33bc97b6206f594a7fcd5f.tar.gz
test: add verification test for non-UTF8 filenames
Diffstat (limited to 'subplot/data.py')
-rw-r--r--subplot/data.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/subplot/data.py b/subplot/data.py
index ba3636c..a24cd0c 100644
--- a/subplot/data.py
+++ b/subplot/data.py
@@ -13,6 +13,12 @@ def create_file_with_random_data(ctx, filename=None):
f.write(data)
+def create_nonutf8_filename(ctx, dirname=None):
+ filename = "\x88"
+ os.mkdir(dirname)
+ open(filename, "wb").close()
+
+
def chmod_file(ctx, filename=None, mode=None):
os.chmod(filename, int(mode, 8))