Skip to content

Commit 7a7d8e4

Browse files
authored
Merge pull request #18384 from michaelnebel/csharp13/escapechars
C# 13: [TEST ONLY] Add test using the new escape char for ESCAPE.
2 parents 49abfdf + 75e562d commit 7a7d8e4

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
3+
public class TestClass
4+
{
5+
public void M()
6+
{
7+
var x1 = "Hello world";
8+
var x2 = "\u001b";
9+
var x3 = "\x1b";
10+
var x4 = "\e";
11+
}
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| Strings.cs:7:18:7:30 | "Hello world" | Hello world |
2+
| Strings.cs:8:18:8:25 | "\u001b" | \u001b |
3+
| Strings.cs:9:18:9:23 | "\u001b" | \u001b |
4+
| Strings.cs:10:18:10:21 | "\u001b" | \u001b |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import csharp
2+
3+
query predicate stringLiterals(StringLiteral lit, string value) {
4+
lit.fromSource() and value = lit.getValue()
5+
}

0 commit comments

Comments
 (0)