File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ describe ' Irregular Console Patterns' {
2+ it ' Can match any Escape sequence' {
3+ " $ ( [char ]0x1b ) [0m" | ? < Console_Code> | Select-Object - ExpandProperty Length | Should - be 4
4+
5+ " $ ( [char ]0x1b ) [1;3;5,~" | ? < Console_Code> | Select-Object - ExpandProperty Length | Should - be 9
6+ }
7+ context ' Console Colors' {
8+ it ' Can Match a 4-bit color' {
9+ $x = " $ ( [char ]0x1b ) [32m" | ? < Console_4BitColor> - Extract
10+ $x.ColorNumber | Should - Be 2
11+ $x.IsForegroundColor | Should - Be 3
12+ }
13+
14+ it ' Can Match a 24-bit color' {
15+ $x = " $ ( [char ]0x1b ) [38;2;255;100;0m" | ? < Console_24BitColor> - Extract
16+ $x.Red | Should - be 255
17+ $x.Green | Should - be 100
18+ $x.Blue | Should - be 0
19+ }
20+ }
21+
22+ context ' Console Styles' {
23+ it ' Can Match Console Styles' {
24+ @ (" $ ( [char ]0x1b ) [3m Italics $ ( [char ]0x1b ) [23m" | ? < Console_Style> ).Count | Should - be 2
25+ }
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments