Split implicit concatenated strings before binary expressions (#7145)

This commit is contained in:
Micha Reiser 2023-09-08 08:51:26 +02:00 committed by GitHub
parent 9671922e40
commit e376c3ff7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1067 additions and 366 deletions

View file

@ -313,3 +313,18 @@ expected_content = (
self.base_url
)
)
rowuses = [(1 << j) | # column ordinal
(1 << (n + i-j + n-1)) | # NW-SE ordinal
(1 << (n + 2*n-1 + i+j)) # NE-SW ordinal
for j in rangen]
skip_bytes = (
header.timecnt * 5 # Transition times and types
+ header.typecnt * 6 # Local time type records
+ header.charcnt # Time zone designations
+ header.leapcnt * 8 # Leap second records
+ header.isstdcnt # Standard/wall indicators
+ header.isutcnt # UT/local indicators
)

View file

@ -118,3 +118,45 @@ def test3():
"(CASE WHEN JSON_TYPE(%s, %%s) IN (%s) "
"THEN JSON_TYPE(%s, %%s) ELSE JSON_EXTRACT(%s, %%s) END)"
) % (lhs, datatype_values, lhs, lhs), (tuple(params) + (json_path,)) * 3
c = (a +
# test leading binary comment
"a" "b" * b
)
c = (a *
# test leading comment
"a" "b" + b
)
c = (a
+ # test trailing comment
"a" "b" * b
)
c = (a
+
"a" "b" # test trailing comment
* b
)
c = (a
*
"a" "b" # test trailing binary comment
+ b
)
c = (a
*
"a" "b"
+ # test trailing operator comment
b
)
c = (a
*
"a" "b"
+
# test trailing operator comment
b
)