Debian Codegraph @

tests/languages/groovy/string_feature.test

raw
1 """"""
2 """foo"""
3 """foo
4 bar"""
5
6 ''''''
7 '''foo'''
8 '''foo
9 bar'''
10
11 ""
12 "fo\"o"
13 ''
14 'fo\'o'
15
16 /foo/
17 /fo\/o/
18
19 $/fo$/$o/$
20 $/foo
21 bar/$
22 "foo /* comment */ bar"
23 'foo // bar'
24 '''foo
25 /* comment */
26 bar'''
27 '''hell\'''o'''
28 """foo
29 // comment
30 bar"""
31 """hell\"""o"""
32
33 ----------------------------------------------------
34
35 [
36 ["interpolation-string", [
37 ["string", "\"\"\"\"\"\""]
38 ]],
39 ["interpolation-string", [
40 ["string", "\"\"\"foo\"\"\""]
41 ]],
42 ["interpolation-string", [
43 ["string", "\"\"\"foo\r\nbar\"\"\""]
44 ]],
45
46 ["string", "''''''"],
47 ["string", "'''foo'''"],
48 ["string", "'''foo\r\nbar'''"],
49
50 ["interpolation-string", [
51 ["string", "\"\""]
52 ]],
53 ["interpolation-string", [
54 ["string", "\"fo\\\"o\""]
55 ]],
56 ["string", "''"],
57 ["string", "'fo\\'o'"],
58
59 ["interpolation-string", [
60 ["string", "/foo/"]
61 ]],
62 ["interpolation-string", [
63 ["string", "/fo\\/o/"]
64 ]],
65
66 ["interpolation-string", [
67 ["string", "$/fo$/"],
68 ["interpolation", [
69 ["interpolation-punctuation", "$"],
70 ["expression", ["o"]]
71 ]],
72 ["string", "/$"]
73 ]],
74 ["interpolation-string", [
75 ["string", "$/foo\r\nbar/$"]
76 ]],
77 ["interpolation-string", [
78 ["string", "\"foo /* comment */ bar\""]
79 ]],
80 ["string", "'foo // bar'"],
81 ["string", "'''foo\r\n/* comment */\r\nbar'''"],
82 ["string", "'''hell\\'''o'''"],
83 ["interpolation-string", [
84 ["string", "\"\"\"foo\r\n// comment\r\nbar\"\"\""]
85 ]],
86 ["interpolation-string", [
87 ["string", "\"\"\"hell\\\"\"\"o\"\"\""]
88 ]]
89 ]
90
91 ----------------------------------------------------
92
93 Checks for single quoted, triple single quoted, double quoted,
94 triple double quoted, slashy and dollar slashy strings.