From 1de8202040ac5b7c1e6dbb04fe2d96c3be1d31f0 Mon Sep 17 00:00:00 2001 From: Fisch Date: Tue, 8 Oct 2024 14:43:13 +0200 Subject: [PATCH] add test for formatting commands --- tools/format_test.txt | 5 +++++ tools/printfile.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tools/format_test.txt diff --git a/tools/format_test.txt b/tools/format_test.txt new file mode 100644 index 0000000..9306d90 --- /dev/null +++ b/tools/format_test.txt @@ -0,0 +1,5 @@ +Nor +\uUnderline\u\u +\bBold\b +\k\k\k\k\k\k mal +\j\j\j\j diff --git a/tools/printfile.py b/tools/printfile.py index cfe42ca..a2883d5 100644 --- a/tools/printfile.py +++ b/tools/printfile.py @@ -47,7 +47,7 @@ def main(): lines=[x.rstrip() for x in lines] # remove whitespaces and linebreaks for iline,line in enumerate(lines): - if not set(line).issubset(chars): + if not set(line).issubset(chars+'\\'): print(str(iline)+":"+str(line)) print("Contains non printable characters") exit()