mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	#1039: Remove all leading $ not just one
This commit is contained in:
		
				
					committed by
					
						 Pablo Santiago Blum de Aguiar
						Pablo Santiago Blum de Aguiar
					
				
			
			
				
	
			
			
			
						parent
						
							7f97818663
						
					
				
				
					commit
					9201ce79cf
				
			| @@ -8,7 +8,15 @@ def output(): | ||||
|     return "$: command not found" | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize("script", ["$ cd newdir", " $ cd newdir"]) | ||||
| @pytest.mark.parametrize( | ||||
|     "script", | ||||
|     [ | ||||
|         "$ cd newdir", | ||||
|         " $ cd newdir", | ||||
|         "$ $ cd newdir" | ||||
|         " $ $ cd newdir", | ||||
|     ], | ||||
| ) | ||||
| def test_match(script, output): | ||||
|     assert match(Command(script, output)) | ||||
|  | ||||
| @@ -31,7 +39,9 @@ def test_not_match(command): | ||||
|     "script, new_command", | ||||
|     [ | ||||
|         ("$ cd newdir", "cd newdir"), | ||||
|         ("$ $ cd newdir", "cd newdir"), | ||||
|         ("$ python3 -m virtualenv env", "python3 -m virtualenv env"), | ||||
|         (" $ $ $ python3 -m virtualenv env", "python3 -m virtualenv env"), | ||||
|     ], | ||||
| ) | ||||
| def test_get_new_command(script, new_command, output): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user