forked from nightroman/PowerShellTraps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.test.ps1
More file actions
32 lines (26 loc) · 722 Bytes
/
.test.ps1
File metadata and controls
32 lines (26 loc) · 722 Bytes
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
task continue-works-for-switch {
($r = .\continue-works-for-switch.ps1)
equals $r.Count 4
equals $r[3] 'Process 4'
}
task switch-hides-current-item {
($r = .\switch-hides-current-item.ps1)
equals $r.Count 3
equals $r[2] "Word '5' length is not 3."
}
task use-continue-not-break {
($r = .\use-continue-not-break.ps1)
# Test 1
# - correct result
# - redundant job is done
equals ($r.out1 -join ', ') 'this is 1, this is 2'
assert ($r.log1 -contains 'Testing 1 with 2')
# Test 2
# - incorrect result
equals ($r.out2 -join ', ') 'this is 1'
# Test 3
# - correct result
# - redundant job is avoided
equals ($r.out3 -join ', ') 'this is 1, this is 2'
assert ($r.log3 -notcontains 'Testing 1 with 2')
}