Skip to content

Commit 117e7dd

Browse files
committed
test(_command_offset): partially use raw strings for readability
Note that Python raw strings cannot represent the strings that end with odd numbers of consecutive backslashes, so only a part of the strings is represented by raw strings.
1 parent a0bbe13 commit 117e7dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/t/unit/test_unit_command_offset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ def test_COMP_WORDBREAKS_backslash(self, bash):
196196
bash_env.write_variable(
197197
"COMP_WORDBREAKS", "%s$IFS" % quote("\\"), quote=False
198198
)
199-
self.check(bash, "a`b\\cd", "cd")
200-
self.check(bash, "a`b\\cde\\fg", "fg")
201-
self.check(bash, "a`b\\c\\\\a", "\\a")
202-
self.check(bash, "a`b\\c\\\\\\a", "a")
203-
self.check(bash, "a`b\\c\\\\\\\\a", "\\a")
204-
self.check(bash, "a`b\\c\\a\\a", "a")
199+
self.check(bash, r"a`b\cd", "cd")
200+
self.check(bash, r"a`b\cde\fg", "fg")
201+
self.check(bash, r"a`b\c\\a", r"\a")
202+
self.check(bash, r"a`b\c\\\a", "a")
203+
self.check(bash, r"a`b\c\\\\a", r"\a")
204+
self.check(bash, r"a`b\c\a\a", "a")
205205
self.check(bash, "a`b\\", "")
206206
self.check(bash, "a`b\\\\", "\\")
207207
self.check(bash, "a`b\\\\\\", "")

0 commit comments

Comments
 (0)