mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Test PSReadLine's DefaultEditMode and bindings
This commit is contained in:
1 parent
c6758603ae
commit
b745d75f1b
1 file changed
+10
@@ -13,6 +13,16 @@ Describe "PSReadLine" {
|
|||||||
$module.Version | Should Be "1.2"
|
$module.Version | Should Be "1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "Should use Emacs Bindings on Linux and OS X" -skip:$IsWindows {
|
||||||
|
(Get-PSReadLineOption).EditMode | Should Be Emacs
|
||||||
|
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be BeginningOfLine
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Should use Windows Bindings on Windows" -skip:(-not $IsWindows) {
|
||||||
|
(Get-PSReadLineOption).EditMode | Should Be Windows
|
||||||
|
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be SelectAll
|
||||||
|
}
|
||||||
|
|
||||||
It "Should set the edit mode" {
|
It "Should set the edit mode" {
|
||||||
Set-PSReadlineOption -EditMode Windows
|
Set-PSReadlineOption -EditMode Windows
|
||||||
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be SelectAll
|
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be SelectAll
|
||||||
|
|||||||
Reference in new issue
Block a user