Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/ast-grep/rule-tests/cmstrcat-to-char-literal-test.yml
3152 views
1
---
2
id: cmstrcat-to-char-literal
3
valid:
4
- 'cmStrCat(other, "li")'
5
- 'cmStrCat(other, variable)'
6
- "cmStrCat(other, 'c')"
7
- "cmStrCat(other, '\\n')"
8
- "cmStrCat(other, \"a\" \"b\")"
9
invalid:
10
- 'cmStrCat(other, "\n")'
11
- 'cmStrCat(other, "n")'
12
- 'cmStrCat(other, "\"")'
13
- "cmStrCat(other, \"\\'\")"
14
- "cmStrCat(other, \"'\")"
15
- 'cmStrCat("\n", other)'
16
- 'cmStrCat("n", other)'
17
- 'cmStrCat("\"", other)'
18
- "cmStrCat(\"\\'\", other)"
19
- "cmStrCat(\"'\", other)"
20
- 'cmStrCat(other, "\n", other)'
21
- 'cmStrCat(other, "n", other)'
22
- 'cmStrCat(other, "\"", other)'
23
- "cmStrCat(other, \"\\'\", other)"
24
- "cmStrCat(other, \"'\", other)"
25
26