Skip to content

Commit

Permalink
Removing local file paths for github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
evccyr committed Jan 22, 2024
1 parent 58a3447 commit 50fa491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions tests/destination_parsing.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod helpers;

use firo_parser::parse_destination;
use helpers::file_to_string;

#[test]
fn valid_destination_file() {
Expand All @@ -18,7 +17,7 @@ fn valid_destination_file() {
],
vec![String::from("<!>"), String::from(" /tmp/something.txt")],
]);
let unparsed = file_to_string("/home/yash/github/firo-parser/tests/destination.firo").unwrap();
let unparsed = include_str!("destination.firo").to_string();
assert_eq!(destination, parse_destination(unparsed).unwrap());
}

Expand All @@ -29,6 +28,6 @@ fn origin_is_valid_destination_file() {
vec![String::from("plugin/file")],
vec![String::from("folder/name with space.txt")],
]);
let unparsed = file_to_string("/home/yash/github/firo-parser/tests/origin.firo").unwrap();
let unparsed = include_str!("origin.firo").to_string();
assert_eq!(destination, parse_destination(unparsed).unwrap().to_vec());
}
5 changes: 2 additions & 3 deletions tests/origin_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ mod helpers;
use std::collections::HashSet;

use firo_parser::parse_origin;
use helpers::file_to_string;

#[test]
fn valid_origin_file() {
Expand All @@ -11,11 +10,11 @@ fn valid_origin_file() {
String::from("plugin/file"),
String::from("folder/name with space.txt"),
]);
let unparsed = file_to_string("/home/yash/github/firo-parser/tests/origin.firo").unwrap();
let unparsed = include_str!("origin.firo").to_string();
assert_eq!(origin, parse_origin(unparsed).unwrap());
}
#[test]
fn destination_is_invalid_origin_file() {
let unparsed = file_to_string("/home/yash/github/firo-parser/tests/destination.firo").unwrap();
let unparsed = include_str!("destination.firo").to_string();
assert!(parse_origin(unparsed).is_err());
}

0 comments on commit 50fa491

Please sign in to comment.