mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	| @@ -46,6 +46,13 @@ class TestBash(object): | ||||
|         assert 'TF_ALIAS=fuck' in shell.app_alias('fuck') | ||||
|         assert 'PYTHONIOENCODING=utf-8' in shell.app_alias('fuck') | ||||
|  | ||||
|     def test_app_alias_variables_correctly_set(self, shell): | ||||
|         alias = shell.app_alias('fuck') | ||||
|         assert "alias fuck='TF_CMD=$(TF_ALIAS" in alias | ||||
|         assert '$(TF_ALIAS=fuck PYTHONIOENCODING' in alias | ||||
|         assert 'PYTHONIOENCODING=utf-8 TF_SHELL_ALIASES' in alias | ||||
|         assert 'ALIASES=$(alias) thefuck' in alias | ||||
|  | ||||
|     def test_get_history(self, history_lines, shell): | ||||
|         history_lines(['ls', 'rm']) | ||||
|         assert list(shell.get_history()) == ['ls', 'rm'] | ||||
|   | ||||
| @@ -45,6 +45,13 @@ class TestZsh(object): | ||||
|         assert 'thefuck' in shell.app_alias('fuck') | ||||
|         assert 'PYTHONIOENCODING' in shell.app_alias('fuck') | ||||
|  | ||||
|     def test_app_alias_variables_correctly_set(self, shell): | ||||
|         alias = shell.app_alias('fuck') | ||||
|         assert "alias fuck='TF_CMD=$(TF_ALIAS" in alias | ||||
|         assert '$(TF_ALIAS=fuck PYTHONIOENCODING' in alias | ||||
|         assert 'PYTHONIOENCODING=utf-8 TF_SHELL_ALIASES' in alias | ||||
|         assert 'ALIASES=$(alias) thefuck' in alias | ||||
|  | ||||
|     def test_get_history(self, history_lines, shell): | ||||
|         history_lines([': 1432613911:0;ls', ': 1432613916:0;rm']) | ||||
|         assert list(shell.get_history()) == ['ls', 'rm'] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user