mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
Added hebrew the list of keyboard layouts (#778)
* Added hebrew the list of keyboard layouts. Fixes #776. * Added tests for hebrew layout. * Fix test. * Make lint happy.
This commit is contained in:
parent
027b41da59
commit
b65e3a9aad
@ -7,7 +7,9 @@ from thefuck.types import Command
|
||||
|
||||
@pytest.mark.parametrize('command', [
|
||||
Command(u'фзе-пуе', 'command not found: фзе-пуе'),
|
||||
Command(u'λσ', 'command not found: λσ')])
|
||||
Command(u'λσ', 'command not found: λσ'),
|
||||
Command(u'שפא-עקא', 'command not found: שפא-עקא'),
|
||||
Command(u'ךד', 'command not found: ךד')])
|
||||
def test_match(command):
|
||||
assert switch_lang.match(command)
|
||||
|
||||
@ -16,13 +18,16 @@ def test_match(command):
|
||||
Command(u'pat-get', 'command not found: pat-get'),
|
||||
Command(u'ls', 'command not found: ls'),
|
||||
Command(u'агсл', 'command not found: агсл'),
|
||||
Command(u'фзе-пуе', 'some info')])
|
||||
Command(u'фзе-пуе', 'some info'),
|
||||
Command(u'שפא-עקא', 'some info')])
|
||||
def test_not_match(command):
|
||||
assert not switch_lang.match(command)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command, new_command', [
|
||||
(Command(u'фзе-пуе штыефдд мшь', ''), 'apt-get install vim'),
|
||||
(Command(u'λσ -λα', ''), 'ls -la')])
|
||||
(Command(u'λσ -λα', ''), 'ls -la'),
|
||||
(Command(u'שפא-עקא ןמדאשךך הןצ', ''), 'apt-get install vim'),
|
||||
(Command(u'ךד -ךש', ''), 'ls -la')])
|
||||
def test_get_new_command(command, new_command):
|
||||
assert switch_lang.get_new_command(command) == new_command
|
||||
|
@ -5,7 +5,8 @@ target_layout = '''qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:"ZXCVB
|
||||
|
||||
source_layouts = [u'''йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,''',
|
||||
u'''ضصثقفغعهخحجچشسیبلاتنمکگظطزرذدپو./ًٌٍَُِّْ][}{ؤئيإأآة»«:؛كٓژٰٔء><؟''',
|
||||
u''';ςερτυθιοπ[]ασδφγηξκλ΄ζχψωβνμ,./:΅ΕΡΤΥΘΙΟΠ{}ΑΣΔΦΓΗΞΚΛ¨"ΖΧΨΩΒΝΜ<>?''']
|
||||
u''';ςερτυθιοπ[]ασδφγηξκλ΄ζχψωβνμ,./:΅ΕΡΤΥΘΙΟΠ{}ΑΣΔΦΓΗΞΚΛ¨"ΖΧΨΩΒΝΜ<>?''',
|
||||
u'''/'קראטוןםפ][שדגכעיחלךף,זסבהנמצתץ.QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?''']
|
||||
|
||||
|
||||
@memoize
|
||||
|
Loading…
x
Reference in New Issue
Block a user