Skip to content

Commit 7225e9d

Browse files
committed
test(dequote{,_incomplete)): use raw stringliteral r""
1 parent 811b674 commit 7225e9d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/t/unit/test_unit_dequote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_7_quote_2(self, bash, functions):
5454

5555
def test_7_quote_3(self, bash, functions):
5656
output = assert_bash_exec(
57-
bash, "__tester \\$\\'a\\\\tb\\'", want_output=True
57+
bash, r"__tester \$\'a\\tb\'", want_output=True
5858
)
5959
assert output.strip() == "<a\tb>"
6060

@@ -66,7 +66,7 @@ def test_7_quote_4(self, bash, functions):
6666

6767
def test_7_quote_5(self, bash, functions):
6868
output = assert_bash_exec(
69-
bash, "__tester \\'abc\\'\\\\\\'\\'def\\'", want_output=True
69+
bash, r"__tester \'abc\'\\\'\'def\'", want_output=True
7070
)
7171
assert output.strip() == "<abc'def>"
7272

test/t/unit/test_unit_dequote_incomplete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_quote_2(self, bash, functions):
5454

5555
def test_quote_3(self, bash, functions):
5656
output = assert_bash_exec(
57-
bash, "__tester \\$\\'a\\\\tb\\'", want_output=True
57+
bash, r"__tester \$\'a\\tb\'", want_output=True
5858
)
5959
assert output.strip() == "<a\tb>"
6060

@@ -66,12 +66,12 @@ def test_quote_4(self, bash, functions):
6666

6767
def test_quote_5(self, bash, functions):
6868
output = assert_bash_exec(
69-
bash, "__tester \\'abc\\'\\\\\\'\\'def\\'", want_output=True
69+
bash, r"__tester \'abc\'\\\'\'def\'", want_output=True
7070
)
7171
assert output.strip() == "<abc'def>"
7272

7373
def test_incomplete_1(self, bash, functions):
74-
output = assert_bash_exec(bash, "__tester 'a\\'", want_output=True)
74+
output = assert_bash_exec(bash, r"__tester 'a\'", want_output=True)
7575
assert output.strip() == "<a>"
7676

7777
def test_incomplete_2(self, bash, functions):

0 commit comments

Comments
 (0)