support new literal types in Python 2.6 (PY-317)

This commit is contained in:
Dmitry Jemerov
2010-01-15 19:27:33 +03:00
parent ff3439ee92
commit bea11cc987
6 changed files with 262 additions and 224 deletions

View File

@@ -6,6 +6,8 @@ import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.markup.EffectType;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.jetbrains.python.fixtures.PyLightFixtureTestCase;
import com.jetbrains.python.psi.LanguageLevel;
import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
import org.jetbrains.annotations.NonNls;
import java.awt.*;
@@ -90,6 +92,18 @@ public class PythonHighlightingTest extends PyLightFixtureTestCase {
doTest();
}
public void testStringBytesLiteralOK() throws Exception {
PythonLanguageLevelPusher.FORCE_LANGUAGE_LEVEL = LanguageLevel.PYTHON26;
PythonLanguageLevelPusher.pushLanguageLevel(myFixture.getProject());
try {
doTest();
}
finally {
PythonLanguageLevelPusher.FORCE_LANGUAGE_LEVEL = null;
}
}
public void testMalformedStringTripleQuoteUnterminated() throws Exception {
doTest();
}