powerslim
Version:
An implementation of FitNesse Slim in PowerShell
45 lines (38 loc) • 816 B
Plain Text
!|Query:Local|get-host|
|Name |Version |
|ConsoleHost |${HOST_VERSION}|
!* Empty dictionary
!|script|
|eval|$list= New-Object "system.collections.generic.dictionary[string,object]";|
''hash-table style''
|Query:Local|$list|
|Value|
''key-value style''
|Query:Local|$list !-|-! % { $_.GetEnumerator() }|
|Key|Value|
*!
!* One element in the dictionary
!|script|
|eval|$list.Add("a","1")|
''hashtable style''
|Query:Local|$list|
|a|
|1|
''key-value style''
|Query:Local|$list !-|-! % { $_.GetEnumerator() }|
|Key|Value|
|a|1|
*!
!* More than one element in the dictionary
!|script|
|eval|$list.Add("b","2")|
''hashtable style''
|Query:Local|$list|
|a|b|
|1|2|
''key-value style''
|Query:Local|$list !-|-! % { $_.GetEnumerator() }|
|Key|Value|
|a|1|
|b|2|
*!