mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
PY-31442 Add test cases for various scenarios of preliminary terminated f-strings
This commit is contained in:
@@ -0,0 +1 @@
|
||||
s = f'{42:'}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo'bar'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"{42:'}"}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo{f"baz'quux"}bar'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo{f"'"}baz'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{42:{f"'"}}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"""{f"'"}"""}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"""{42:f"'"}"""}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"""{"'"}"""}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"""{42:"'"}"""}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo{"'"}baz'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{42:{"'"}}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo{f'bar'}baz'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{42:{f'foo'}}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"{f'foo'}"}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"{42:f'foo'}"}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"{'foo'}"}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{f"{42:'foo'}"}'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'foo{'bar'}baz'
|
||||
@@ -0,0 +1 @@
|
||||
s = f'{42:{'foo'}}'
|
||||
@@ -597,6 +597,86 @@ public class PythonParsingTest extends ParsingTestCase {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfNestedStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideNestedStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfFStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideFStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfNestedFStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideNestedFStringLiteral() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfNestedStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideNestedStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfFStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideFStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteOfNestedFStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInsideNestedFStringLiteralInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInLiteralPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInNestedLiteralPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
public void testFStringTerminatedByQuoteInNestedFormatPart() {
|
||||
doTest(LanguageLevel.PYTHON36);
|
||||
}
|
||||
|
||||
// PY-19036
|
||||
public void testAwaitInNonAsyncNestedFunction() {
|
||||
doTest(LanguageLevel.PYTHON35);
|
||||
|
||||
Reference in New Issue
Block a user