blob: 100f849887098b30005ff64633ae40ef1821bb7a [file] [log] [blame]
Tor Norbye3a2425a52013-11-04 10:16:08 -08001/*
2 * Copyright 2000-2013 JetBrains s.r.o.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.jetbrains.python;
17
18import com.jetbrains.python.fixtures.PyLexerTestCase;
19import com.jetbrains.python.lexer.PyStringLiteralLexer;
20
21/**
22 * @author yole
23 */
24public class PyStringLiteralLexerTest extends PyLexerTestCase {
25 public void testBackslashN() { // PY-1313
26 PyLexerTestCase.doLexerTest("u\"\\N{LATIN SMALL LETTER B}\"", new PyStringLiteralLexer(PyTokenTypes.SINGLE_QUOTED_UNICODE),
27 "Py:SINGLE_QUOTED_UNICODE", "VALID_STRING_ESCAPE_TOKEN", "Py:SINGLE_QUOTED_UNICODE");
28 }
Tor Norbyef88d3e12013-11-05 17:01:08 -080029
30 public void testRawBackslashN() {
31 PyLexerTestCase.doLexerTest("r'[\\w\\']'", new PyStringLiteralLexer(PyTokenTypes.SINGLE_QUOTED_STRING), true,
32 "r'[\\w\\']'");
33 }
Tor Norbye3a2425a52013-11-04 10:16:08 -080034}