Skip to content

Commit

Permalink
Refactor build log parser
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster committed May 25, 2019
1 parent e3be54b commit 913475f
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 1 addition & 4 deletions src/build/log_parser.rs
Expand Up @@ -225,7 +225,6 @@ impl PartialOrd for FileRange {
#[cfg(test)]
mod tests {
use super::*;
use std::fs;

fn create_uri(name: &str) -> Uri {
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(name);
Expand All @@ -234,12 +233,10 @@ mod tests {

fn verify(name: &str, expected: Vec<BuildError>) {
let log_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("test")
.join("data")
.join("logs")
.join(name);

let log = fs::read_to_string(log_path).unwrap();
let log = std::fs::read_to_string(log_path).unwrap();
let actual = parse_build_log(&create_uri("parent.tex"), &log);
assert_eq!(expected, actual);
}
Expand Down

0 comments on commit 913475f

Please sign in to comment.