Skip to content

Commit 299f86c

Browse files
committed
r string tests
1 parent 108363f commit 299f86c

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

opteryx/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__build__ = 1384
1+
__build__ = 1385
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/query_planner/test_r_strings.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
# Define the test cases as a list of (input, expected_output) tuples
1111
# fmt:off
1212
test_cases = [
13-
("This is a test string with r'abc' and R\"def\".", "This is a test string with BASE85_DECODE('VPaz') and BASE85_DECODE('WMyU')."),
14-
("r'123' should become BASE85_DECODE('F)}j')", "BASE85_DECODE('F)}j') should become BASE85_DECODE('F)}j')"),
15-
('R"xyz" should become BASE85_DECODE(\'czJp\')', 'BASE85_DECODE(\'czJp\') should become BASE85_DECODE(\'czJp\')'),
16-
("Mix of r'one' and R\"two\"", "Mix of BASE85_DECODE('Z*FA') and BASE85_DECODE('ba!t')"),
13+
("This is a test string with r'abc' and R\"def\".", "This is a test string with BASE64_DECODE('YWJj') and BASE64_DECODE('ZGVm')."),
14+
("r'123' should become BASE64_DECODE('F)}j')", "BASE64_DECODE('MTIz') should become BASE64_DECODE('F)}j')"),
15+
('R"xyz" should become BASE64_DECODE(\'czJp\')', 'BASE64_DECODE(\'eHl6\') should become BASE64_DECODE(\'czJp\')'),
16+
("Mix of r'one' and R\"two\"", "Mix of BASE64_DECODE('b25l') and BASE64_DECODE('dHdv')"),
1717
("No prefixed strings here.", "No prefixed strings here."),
18-
("R'' and r\"\" should be handled.", "BASE85_DECODE('') and BASE85_DECODE('') should be handled."),
19-
("I am escaping r'\\1' and R'\\1'", "I am escaping BASE85_DECODE('Trm') and BASE85_DECODE('Trm')"),
20-
("I am also escaping r'\1' and r'\1'", "I am also escaping BASE85_DECODE('0R') and BASE85_DECODE('0R')"),
18+
("R'' and r\"\" should be handled.", "BASE64_DECODE('') and BASE64_DECODE('') should be handled."),
19+
("I am escaping r'\\1' and R'\\1'", "I am escaping BASE64_DECODE('XDE=') and BASE64_DECODE('XDE=')"),
20+
("I am also escaping r'\1' and r'\1'", "I am also escaping BASE64_DECODE('AQ==') and BASE64_DECODE('AQ==')"),
2121
]
2222
# fmt:on
2323

0 commit comments

Comments
 (0)