mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Add simple loop-through mode
Use a loop-through mode that simply copies input to output if a non-interactive terminal is detected. see #150
This commit is contained in:
1 parent
246cf79dbd
commit
226d9a573a
4 files changed
+97
-31
No files matched your search
+5
-2
@@ -41,8 +41,11 @@ impl BatTester {
|
||||
pub fn test_snapshot(&self, style: &str) {
|
||||
let output = Command::new(&self.exe)
|
||||
.current_dir(self.temp_dir.path())
|
||||
.args(&["sample.rs", &format!("--style={}", style)])
|
||||
.output()
|
||||
.args(&[
|
||||
"sample.rs",
|
||||
"--decorations=always",
|
||||
&format!("--style={}", style),
|
||||
]).output()
|
||||
.expect("bat failed");
|
||||
|
||||
// have to do the replace because the filename in the header changes based on the current working directory
|
||||
|
||||
Reference in new issue
Block a user