/
function_feature.test
62 lines (54 loc) · 1.4 KB
/
function_feature.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
param location string = resourceGroup().location
var hostingPlanName = 'hostingplan${uniqueString(resourceGroup().id)}'
array(parameters('stringToConvert'))
createArray(1, 2, 3)
----------------------------------------------------
[
["keyword", "param"],
" location ",
["datatype", "string"],
["operator", "="],
["function", "resourceGroup"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "."],
"location\r\n",
["keyword", "var"],
" hostingPlanName ",
["operator", "="],
["interpolated-string", [
["string", "'hostingplan"],
["interpolation", [
["punctuation", "${"],
["expression", [
["function", "uniqueString"],
["punctuation", "("],
["function", "resourceGroup"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "."],
"id",
["punctuation", ")"]
]],
["punctuation", "}"]
]],
["string", "'"]
]],
["function", "array"],
["punctuation", "("],
["function", "parameters"],
["punctuation", "("],
["string", "'stringToConvert'"],
["punctuation", ")"],
["punctuation", ")"],
["function", "createArray"],
["punctuation", "("],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for functions. Based upon https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-array