Add *_with_name methods

This commit is contained in:
sharkdp authored and David Peter committed 2020-04-22 23:55:28 +02:00
1 parent 53a973e9dd
commit 261a7ea154
5 files changed
+37 -13

No files matched your search

+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