Debian Codegraph @

tests/languages/kusto/string_feature.test

raw
1 ""
2 ''
3 @""
4 @''
5 "foo\""
6 'bar\''
7 @"\"
8 @'\'
9
10 ```
11 multiline
12 ```
13
14 // Obfuscated string literals
15 h'hello'
16 h@'world'
17 h"hello"
18
19 // string concatenation
20
21 print strlen("Hello"', '@"world!"); // Nothing between them
22
23 print strlen("Hello" ', ' @"world!"); // Separated by whitespace only
24
25 print strlen("Hello"
26 // Comment
27 ', '@"world!"); // Separated by whitespace and a comment
28
29 ----------------------------------------------------
30
31 [
32 ["string", "\"\""],
33 ["string", "''"],
34 ["string", "@\"\""],
35 ["string", "@''"],
36 ["string", "\"foo\\\"\""],
37 ["string", "'bar\\''"],
38 ["string", "@\"\\\""],
39 ["string", "@'\\'"],
40
41 ["string", "```\r\nmultiline\r\n```"],
42
43 ["comment", "// Obfuscated string literals"],
44 ["string", "h'hello'"],
45 ["string", "h@'world'"],
46 ["string", "h\"hello\""],
47
48 ["comment", "// string concatenation"],
49
50 ["keyword", "print"],
51 ["function", "strlen"],
52 ["punctuation", "("],
53 ["string", "\"Hello\""],
54 ["string", "', '"],
55 ["string", "@\"world!\""],
56 ["punctuation", ")"],
57 ["punctuation", ";"],
58 ["comment", "// Nothing between them"],
59
60 ["keyword", "print"],
61 ["function", "strlen"],
62 ["punctuation", "("],
63 ["string", "\"Hello\""],
64 ["string", "', '"],
65 ["string", "@\"world!\""],
66 ["punctuation", ")"],
67 ["punctuation", ";"],
68 ["comment", "// Separated by whitespace only"],
69
70 ["keyword", "print"],
71 ["function", "strlen"],
72 ["punctuation", "("],
73 ["string", "\"Hello\""],
74
75 ["comment", "// Comment"],
76
77 ["string", "', '"],
78 ["string", "@\"world!\""],
79 ["punctuation", ")"],
80 ["punctuation", ";"],
81 ["comment", "// Separated by whitespace and a comment"]
82 ]