mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +00:00 
			
		
		
		
	Add test for UTF-16LE encoding
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								tests/examples/test_UTF-16LE.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tests/examples/test_UTF-16LE.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -436,3 +436,15 @@ fn config_read_arguments_from_file() { | |||||||
|         .success() |         .success() | ||||||
|         .stdout("dummy-pager-from-config\n"); |         .stdout("dummy-pager-from-config\n"); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #[test] | ||||||
|  | fn utf16() { | ||||||
|  |     // The output will be converted to UTF-8 with a leading UTF-8 BOM | ||||||
|  |     bat() | ||||||
|  |         .arg("--plain") | ||||||
|  |         .arg("--decorations=always") | ||||||
|  |         .arg("test_UTF-16LE.txt") | ||||||
|  |         .assert() | ||||||
|  |         .success() | ||||||
|  |         .stdout(std::str::from_utf8(b"\xEF\xBB\xBFhello world\n").unwrap()); | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user