mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +00:00 
			
		
		
		
	Modified snapshot tests to support tab expansion.
This changes how the files are named (to allow for snapshots that aren't directly related to the --style argument) and fixes the generate_snapshots.py script to work with the latest version of bat. Three new tests are also introduced: - tabs_4 - Tab expansion with a width of 4. - tabs_8 - Tab expansion with a width of 8. - tabs_passthrough - No tab expansion.
This commit is contained in:
		| @@ -10,7 +10,7 @@ fn main() { | ||||
|         "The perimeter of the rectangle is {} pixels.", | ||||
|         perimeter(&rect1) | ||||
|     ); | ||||
|     println!(r#"This line contains invalid utf8:  "<22><><EFBFBD><EFBFBD><EFBFBD>"#; | ||||
|     println!(r#"This line contains invalid utf8:  "<22><><EFBFBD><EFBFBD><EFBFBD>"#; | ||||
| } | ||||
|  | ||||
| fn area(rectangle: &Rectangle) -> u32 { | ||||
| @@ -20,3 +20,17 @@ fn area(rectangle: &Rectangle) -> u32 { | ||||
| fn perimeter(rectangle: &Rectangle) -> u32 { | ||||
|     (rectangle.width + rectangle.height) * 2 | ||||
| } | ||||
|  | ||||
| // Tab alignment: | ||||
| /* | ||||
| 	Indent | ||||
| 	1	2	3	4 | ||||
| 1	? | ||||
| 22	? | ||||
| 333	? | ||||
| 4444	? | ||||
| 55555	? | ||||
| 666666	? | ||||
| 7777777	? | ||||
| 88888888	? | ||||
| */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user