Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# 13: [TEST ONLY] Add test using the new escape char for ESCAPE. #18384

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions csharp/ql/test/library-tests/strings/Strings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

public class TestClass
{
public void M()
{
var x1 = "Hello world";
var x2 = "\u001b";
var x3 = "\x1b";
var x4 = "\e";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
| Strings.cs:7:18:7:30 | "Hello world" | Hello world |
| Strings.cs:8:18:8:25 | "\u001b" | \u001b |
| Strings.cs:9:18:9:23 | "\u001b" | \u001b |
| Strings.cs:10:18:10:21 | "\u001b" | \u001b |
5 changes: 5 additions & 0 deletions csharp/ql/test/library-tests/strings/stringLiterals.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import csharp

query predicate stringLiterals(StringLiteral lit, string value) {
lit.fromSource() and value = lit.getValue()
}
Loading