Skip to content

Commit 9499972

Browse files
committed
PS: Run tests and accept test changes.
1 parent c26fdc3 commit 9499972

File tree

9 files changed

+461
-444
lines changed

9 files changed

+461
-444
lines changed
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
arrayExpr
2-
| Arrays.ps1:11:11:11:25 | ArrayExpression at: Arrays.ps1:11:11:11:25 | Arrays.ps1:11:13:11:24 | StatementBlock at: Arrays.ps1:11:13:11:24 |
3-
| Arrays.ps1:14:41:14:44 | ArrayExpression at: Arrays.ps1:14:41:14:44 | Arrays.ps1:0:0:0:0 | StatementBlock at: Arrays.ps1:0:0:0:0 |
2+
| Arrays.ps1:11:11:11:25 | @(...) | Arrays.ps1:11:13:11:24 | {...} |
3+
| Arrays.ps1:14:41:14:44 | @(...) | Arrays.ps1:0:0:0:0 | {...} |
44
arrayLiteral
5-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 0 | Arrays.ps1:1:11:1:12 | 1 |
6-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 1 | Arrays.ps1:1:13:1:14 | 2 |
7-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 2 | Arrays.ps1:1:15:1:18 | a |
8-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 3 | Arrays.ps1:1:19:1:24 | true |
9-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 4 | Arrays.ps1:1:25:1:31 | false |
10-
| Arrays.ps1:1:11:1:37 | ArrayLiteral at: Arrays.ps1:1:11:1:37 | 5 | Arrays.ps1:1:32:1:37 | null |
11-
| Arrays.ps1:5:34:5:37 | ArrayLiteral at: Arrays.ps1:5:34:5:37 | 0 | Arrays.ps1:5:34:5:35 | 2 |
12-
| Arrays.ps1:5:34:5:37 | ArrayLiteral at: Arrays.ps1:5:34:5:37 | 1 | Arrays.ps1:5:36:5:37 | 2 |
13-
| Arrays.ps1:6:9:6:12 | ArrayLiteral at: Arrays.ps1:6:9:6:12 | 0 | Arrays.ps1:6:9:6:10 | 0 |
14-
| Arrays.ps1:6:9:6:12 | ArrayLiteral at: Arrays.ps1:6:9:6:12 | 1 | Arrays.ps1:6:11:6:12 | 0 |
15-
| Arrays.ps1:7:9:7:12 | ArrayLiteral at: Arrays.ps1:7:9:7:12 | 0 | Arrays.ps1:7:9:7:10 | 1 |
16-
| Arrays.ps1:7:9:7:12 | ArrayLiteral at: Arrays.ps1:7:9:7:12 | 1 | Arrays.ps1:7:11:7:12 | 0 |
17-
| Arrays.ps1:8:9:8:12 | ArrayLiteral at: Arrays.ps1:8:9:8:12 | 0 | Arrays.ps1:8:9:8:10 | 0 |
18-
| Arrays.ps1:8:9:8:12 | ArrayLiteral at: Arrays.ps1:8:9:8:12 | 1 | Arrays.ps1:8:11:8:12 | 1 |
19-
| Arrays.ps1:9:9:9:12 | ArrayLiteral at: Arrays.ps1:9:9:9:12 | 0 | Arrays.ps1:9:9:9:10 | 1 |
20-
| Arrays.ps1:9:9:9:12 | ArrayLiteral at: Arrays.ps1:9:9:9:12 | 1 | Arrays.ps1:9:11:9:12 | 1 |
21-
| Arrays.ps1:11:13:11:24 | ArrayLiteral at: Arrays.ps1:11:13:11:24 | 0 | Arrays.ps1:11:13:11:16 | a |
22-
| Arrays.ps1:11:13:11:24 | ArrayLiteral at: Arrays.ps1:11:13:11:24 | 1 | Arrays.ps1:11:17:11:20 | b |
23-
| Arrays.ps1:11:13:11:24 | ArrayLiteral at: Arrays.ps1:11:13:11:24 | 2 | Arrays.ps1:11:21:11:24 | c |
5+
| Arrays.ps1:1:11:1:37 | ...,... | 0 | Arrays.ps1:1:11:1:12 | 1 |
6+
| Arrays.ps1:1:11:1:37 | ...,... | 1 | Arrays.ps1:1:13:1:14 | 2 |
7+
| Arrays.ps1:1:11:1:37 | ...,... | 2 | Arrays.ps1:1:15:1:18 | a |
8+
| Arrays.ps1:1:11:1:37 | ...,... | 3 | Arrays.ps1:1:19:1:24 | true |
9+
| Arrays.ps1:1:11:1:37 | ...,... | 4 | Arrays.ps1:1:25:1:31 | false |
10+
| Arrays.ps1:1:11:1:37 | ...,... | 5 | Arrays.ps1:1:32:1:37 | null |
11+
| Arrays.ps1:5:34:5:37 | ...,... | 0 | Arrays.ps1:5:34:5:35 | 2 |
12+
| Arrays.ps1:5:34:5:37 | ...,... | 1 | Arrays.ps1:5:36:5:37 | 2 |
13+
| Arrays.ps1:6:9:6:12 | ...,... | 0 | Arrays.ps1:6:9:6:10 | 0 |
14+
| Arrays.ps1:6:9:6:12 | ...,... | 1 | Arrays.ps1:6:11:6:12 | 0 |
15+
| Arrays.ps1:7:9:7:12 | ...,... | 0 | Arrays.ps1:7:9:7:10 | 1 |
16+
| Arrays.ps1:7:9:7:12 | ...,... | 1 | Arrays.ps1:7:11:7:12 | 0 |
17+
| Arrays.ps1:8:9:8:12 | ...,... | 0 | Arrays.ps1:8:9:8:10 | 0 |
18+
| Arrays.ps1:8:9:8:12 | ...,... | 1 | Arrays.ps1:8:11:8:12 | 1 |
19+
| Arrays.ps1:9:9:9:12 | ...,... | 0 | Arrays.ps1:9:9:9:10 | 1 |
20+
| Arrays.ps1:9:9:9:12 | ...,... | 1 | Arrays.ps1:9:11:9:12 | 1 |
21+
| Arrays.ps1:11:13:11:24 | ...,... | 0 | Arrays.ps1:11:13:11:16 | a |
22+
| Arrays.ps1:11:13:11:24 | ...,... | 1 | Arrays.ps1:11:17:11:20 | b |
23+
| Arrays.ps1:11:13:11:24 | ...,... | 2 | Arrays.ps1:11:21:11:24 | c |

powershell/ql/test/library-tests/ast/Arrays/arrays.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import powershell
22

3-
query predicate arrayExpr(ArrayExpr arrayExpr, StmtBlock subExpr) { subExpr = arrayExpr.getStatementBlock() }
3+
query predicate arrayExpr(ArrayExpr arrayExpr, StmtBlock subExpr) { subExpr = arrayExpr.getStmtBlock() }
44

55
query predicate arrayLiteral(ArrayLiteral arrayLiteral, int i, Expr e) {
66
e = arrayLiteral.getElement(i)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| ParamBlock.ps1:2:1:5:2 | ParamBlock | 0 | ParamBlock.ps1:3:5:4:23 | Parameter |
1+
| ParamBlock.ps1:2:1:5:2 | param(...) | 0 | ParamBlock.ps1:3:5:4:23 | Parameter |
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
binaryExpr
22
| BinaryExpression.ps1:3:11:3:24 | ...+... | BinaryExpression.ps1:3:11:3:16 | val1 | BinaryExpression.ps1:3:19:3:24 | val2 |
3-
| TernaryExpression.ps1:1:9:1:16 | ...+... | TernaryExpression.ps1:1:9:1:10 | 6 | TernaryExpression.ps1:1:15:1:16 | 7 |
3+
| TernaryExpression.ps1:1:9:1:16 | ... -gt ... | TernaryExpression.ps1:1:9:1:10 | 6 | TernaryExpression.ps1:1:15:1:16 | 7 |
44
cmdExpr
55
| BinaryExpression.ps1:1:9:1:10 | 1 | BinaryExpression.ps1:1:9:1:10 | 1 |
66
| BinaryExpression.ps1:2:9:2:10 | 2 | BinaryExpression.ps1:2:9:2:10 | 2 |
77
| BinaryExpression.ps1:3:11:3:24 | ...+... | BinaryExpression.ps1:3:11:3:24 | ...+... |
88
| BinaryExpression.ps1:4:1:4:8 | result | BinaryExpression.ps1:4:1:4:8 | result |
9-
| ExpandableString.ps1:1:1:1:40 | ExpandableStringExpression at: ExpandableString.ps1:1:1:1:40 | ExpandableString.ps1:1:1:1:40 | ExpandableStringExpression at: ExpandableString.ps1:1:1:1:40 |
10-
| ExpandableString.ps1:1:23:1:38 | (no string representation) | file://:0:0:0:0 | (no string representation) |
11-
| SubExpression.ps1:1:1:1:24 | ArrayExpression at: SubExpression.ps1:1:1:1:24 | SubExpression.ps1:1:1:1:24 | ArrayExpression at: SubExpression.ps1:1:1:1:24 |
12-
| SubExpression.ps1:2:1:2:22 | ArrayExpression at: SubExpression.ps1:2:1:2:22 | SubExpression.ps1:2:1:2:22 | ArrayExpression at: SubExpression.ps1:2:1:2:22 |
9+
| ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name |
10+
| ExpandableString.ps1:1:23:1:38 | Now | ExpandableString.ps1:1:23:1:38 | Now |
11+
| SubExpression.ps1:1:1:1:24 | call to AddDays | SubExpression.ps1:1:1:1:24 | call to AddDays |
12+
| SubExpression.ps1:2:1:2:22 | call to AddDays | SubExpression.ps1:2:1:2:22 | call to AddDays |
1313
| TernaryExpression.ps1:1:8:1:23 | ...?...:... | TernaryExpression.ps1:1:8:1:23 | ...?...:... |
14-
| TernaryExpression.ps1:1:9:1:16 | ...+... | TernaryExpression.ps1:1:9:1:16 | ...+... |
14+
| TernaryExpression.ps1:1:9:1:16 | ... -gt ... | TernaryExpression.ps1:1:9:1:16 | ... -gt ... |
1515
invokeMemoryExpression
16-
| SubExpression.ps1:1:1:1:24 | ArrayExpression at: SubExpression.ps1:1:1:1:24 | file://:0:0:0:0 | (no string representation) | 0 | SubExpression.ps1:1:21:1:23 | 10 |
16+
| SubExpression.ps1:1:1:1:24 | call to AddDays | SubExpression.ps1:1:1:1:12 | $(...) | 0 | SubExpression.ps1:1:21:1:23 | 10 |
1717
expandableString
18-
| ExpandableString.ps1:1:1:1:40 | ExpandableStringExpression at: ExpandableString.ps1:1:1:1:40 | 0 | ExpandableString.ps1:1:8:1:13 | name |
19-
| ExpandableString.ps1:1:1:1:40 | ExpandableStringExpression at: ExpandableString.ps1:1:1:1:40 | 1 | file://:0:0:0:0 | (no string representation) |
18+
| ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | 0 | ExpandableString.ps1:1:8:1:13 | name |
19+
| ExpandableString.ps1:1:1:1:40 | Date: $([DateTime]::Now)\nName: $name | 1 | ExpandableString.ps1:1:21:1:39 | $(...) |

powershell/ql/test/library-tests/ast/Expressions/expressions.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ query predicate cmdExpr(CmdExpr cmd, Expr e) {
99
e = cmd.getExpr()
1010
}
1111

12-
query predicate invokeMemoryExpression(InvokeMemberExpression invoke, Expr e, int i, Expr arg) {
13-
e = invoke.getExpression() and
12+
query predicate invokeMemoryExpression(InvokeMemberExpr invoke, Expr e, int i, Expr arg) {
13+
e = invoke.getBase() and
1414
arg = invoke.getArgument(i)
1515
}
1616

17-
query predicate expandableString(ExpandableStringExpression expandable, int i, Expr e) {
17+
query predicate expandableString(ExpandableStringExpr expandable, int i, Expr e) {
1818
e = expandable.getExpr(i)
1919
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
doUntil
2-
| DoUntil.ps1:1:1:7:19 | DoUntil | DoUntil.ps1:7:10:7:18 | ...\|... | DoUntil.ps1:2:1:7:2 | StatementBlock at: DoUntil.ps1:2:1:7:2 |
2+
| DoUntil.ps1:1:1:7:19 | DoUntil | DoUntil.ps1:7:10:7:18 | ... -le ... | DoUntil.ps1:2:1:7:2 | {...} |
33
doWhile
4-
| DoWhile.ps1:1:1:7:19 | DoWhile | DoWhile.ps1:7:10:7:18 | ...\|... | DoWhile.ps1:2:1:7:2 | StatementBlock at: DoWhile.ps1:2:1:7:2 |
4+
| DoWhile.ps1:1:1:7:19 | DoWhile | DoWhile.ps1:7:10:7:18 | ... -le ... | DoWhile.ps1:2:1:7:2 | {...} |
55
while
6-
| While.ps1:2:1:13:2 | while(...) {...} | While.ps1:2:8:2:18 | ...\|... | While.ps1:3:1:13:2 | StatementBlock at: While.ps1:3:1:13:2 |
6+
| While.ps1:2:1:13:2 | while(...) {...} | While.ps1:2:8:2:18 | ... -le ... | While.ps1:3:1:13:2 | {...} |
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
| ExitStatement.ps1:1:1:1:8 | exit ... |
22
| ExitStatement.ps1:1:6:1:8 | -1 |
3-
| ExitStatement.ps1:1:6:1:8 | ...\|... |
3+
| ExitStatement.ps1:1:6:1:8 | -1 |
44
| IfStatement.ps1:1:1:1:7 | ...=... |
55
| IfStatement.ps1:1:6:1:7 | 4 |
66
| IfStatement.ps1:3:1:8:2 | if (...) {...} else {...} |
7-
| IfStatement.ps1:3:5:3:13 | ...+... |
8-
| IfStatement.ps1:3:5:3:13 | ...\|... |
9-
| IfStatement.ps1:4:2:4:36 | ...\|... |
10-
| IfStatement.ps1:4:2:4:36 | ExpandableStringExpression at: IfStatement.ps1:4:2:4:36 |
11-
| IfStatement.ps1:7:2:7:21 | ...\|... |
12-
| IfStatement.ps1:7:2:7:21 | ExpandableStringExpression at: IfStatement.ps1:7:2:7:21 |
13-
| TrapStatement.ps1:1:1:4:2 | FunctionDefinition at: TrapStatement.ps1:1:1:4:2 |
7+
| IfStatement.ps1:3:5:3:13 | ... -ge ... |
8+
| IfStatement.ps1:3:5:3:13 | ... -ge ... |
9+
| IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
10+
| IfStatement.ps1:4:2:4:36 | $x is greater than or equal to 3 |
11+
| IfStatement.ps1:7:2:7:21 | $x is less than 3 |
12+
| IfStatement.ps1:7:2:7:21 | $x is less than 3 |
13+
| TrapStatement.ps1:1:1:4:2 | TrapTest |
1414
| TrapStatement.ps1:2:5:2:26 | TrapStatement at: TrapStatement.ps1:2:5:2:26 |
15-
| TrapStatement.ps1:2:11:2:25 | ...\|... |
1615
| TrapStatement.ps1:2:11:2:25 | Error found. |
17-
| TrapStatement.ps1:3:5:3:19 | ...\|... |
16+
| TrapStatement.ps1:2:11:2:25 | Error found. |
17+
| TrapStatement.ps1:3:5:3:19 | nonsenseString |
1818
| TrapStatement.ps1:3:5:3:19 | nonsenseString |
19-
| TrapStatement.ps1:6:1:6:9 | ...\|... |
19+
| TrapStatement.ps1:6:1:6:9 | TrapTest |
2020
| TrapStatement.ps1:6:1:6:9 | TrapTest |
2121
| Try.ps1:1:1:13:2 | try {...} |
2222
| Try.ps1:2:4:2:95 | ...=... |
23-
| Try.ps1:2:17:2:95 | ...\|... |
2423
| Try.ps1:2:17:2:95 | New-Object |
25-
| Try.ps1:2:69:2:94 | ...\|... |
26-
| Try.ps1:2:69:2:94 | ArrayLiteral at: Try.ps1:2:69:2:94 |
27-
| Try.ps1:3:11:3:21 | ...\|... |
24+
| Try.ps1:2:17:2:95 | New-Object |
25+
| Try.ps1:2:69:2:94 | ...,... |
26+
| Try.ps1:2:69:2:94 | ...,... |
27+
| Try.ps1:3:5:3:21 | throw ... |
2828
| Try.ps1:3:11:3:21 | Exception |
29-
| Try.ps1:6:5:6:64 | ...\|... |
29+
| Try.ps1:3:11:3:21 | Exception |
30+
| Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
3031
| Try.ps1:6:5:6:64 | Unable to download MyDoc.doc from http://www.contoso.com. |
31-
| Try.ps1:9:5:9:52 | ...\|... |
3232
| Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
33-
| Try.ps1:12:5:12:37 | ...\|... |
33+
| Try.ps1:9:5:9:52 | An error occurred that could not be resolved. |
3434
| Try.ps1:12:5:12:37 | The finally block is executed. |
35-
| UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | FunctionDefinition at: UseProcessBlockForPipelineCommand.ps1:1:1:11:2 |
36-
| UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | ...\|... |
35+
| Try.ps1:12:5:12:37 | The finally block is executed. |
36+
| UseProcessBlockForPipelineCommand.ps1:1:1:11:2 | Get-Number |
37+
| UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |
3738
| UseProcessBlockForPipelineCommand.ps1:10:5:10:12 | Number |
38-
| file://:0:0:0:0 | (no string representation) |

0 commit comments

Comments
 (0)