1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-30 18:11:44 +00:00

Add *_with_name methods

This commit is contained in:
sharkdp
2020-04-22 22:41:25 +02:00
committed by David Peter
parent 53a973e9dd
commit 261a7ea154
5 changed files with 37 additions and 13 deletions
+1 -2
View File
@@ -311,8 +311,7 @@ mod tests {
}
fn syntax_for_stdin_with_content(&self, file_name: &str, content: &[u8]) -> String {
let mut input = Input::stdin();
input.set_provided_name(Some(OsStr::new(file_name)));
let input = Input::stdin().with_name(Some(OsStr::new(file_name)));
let mut opened_input = input.open(content).unwrap();
let syntax = self