mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 07:04:04 +00:00 
			
		
		
		
	Add integration tests running bat with empty input files.
This commit is contained in:
		
							
								
								
									
										0
									
								
								tests/examples/empty.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/examples/empty.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -76,6 +76,58 @@ fn concatenate_stdin() { | ||||
|         .stdout("hello world\nstdin\nhello world\n"); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn concatenate_empty_first() { | ||||
|     bat() | ||||
|         .arg("empty.txt") | ||||
|         .arg("test.txt") | ||||
|         .assert() | ||||
|         .success() | ||||
|         .stdout("hello world\n"); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn concatenate_empty_last() { | ||||
|     bat() | ||||
|         .arg("test.txt") | ||||
|         .arg("empty.txt") | ||||
|         .assert() | ||||
|         .success() | ||||
|         .stdout("hello world\n"); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn concatenate_empty_both() { | ||||
|     bat() | ||||
|         .arg("empty.txt") | ||||
|         .arg("empty.txt") | ||||
|         .assert() | ||||
|         .success() | ||||
|         .stdout(""); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn concatenate_empty_between() { | ||||
|     bat() | ||||
|         .arg("test.txt") | ||||
|         .arg("empty.txt") | ||||
|         .arg("test.txt") | ||||
|         .assert() | ||||
|         .success() | ||||
|         .stdout("hello world\nhello world\n"); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn concatenate_empty_first_and_last() { | ||||
|     bat() | ||||
|         .arg("empty.txt") | ||||
|         .arg("test.txt") | ||||
|         .arg("empty.txt") | ||||
|         .assert() | ||||
|         .success() | ||||
|         .stdout("hello world\n"); | ||||
| } | ||||
|  | ||||
| #[test] | ||||
| fn line_numbers() { | ||||
|     bat() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user