Add useless test.
This commit is contained in:
		
							parent
							
								
									f25404f2f2
								
							
						
					
					
						commit
						d046fe6180
					
				
					 1 changed files with 18 additions and 0 deletions
				
			
		
							
								
								
									
										18
									
								
								src/test.zig
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								src/test.zig
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					const std = @import("std");
 | 
				
			||||||
 | 
					const path = std.fs.path;
 | 
				
			||||||
 | 
					const lib = @import("./lib.zig");
 | 
				
			||||||
 | 
					const fmt = std.fmt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const default_max_depth = 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					test "buffer stuff" {
 | 
				
			||||||
 | 
					    var buffer = [_]u8 {0} ** (std.fs.MAX_PATH_BYTES + 100);
 | 
				
			||||||
 | 
					    var fbs = std.io.fixedBufferStream(&buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    var writer = fbs.writer();
 | 
				
			||||||
 | 
					    try fmt.formatType('W',      "c", fmt.FormatOptions{}, writer, default_max_depth);
 | 
				
			||||||
 | 
					    try fmt.formatType("ritten", "s", fmt.FormatOptions{}, writer, default_max_depth);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    lib.print("{s}\n", .{fbs.getWritten()});
 | 
				
			||||||
 | 
					    fbs.reset();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue