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 e8bc1fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
7 changes: 2 additions & 5 deletions tests/destination_parsing.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
mod helpers;

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

#[test]
fn valid_destination_file() {
Expand All @@ -18,7 +15,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 +26,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());
}
6 changes: 0 additions & 6 deletions tests/helpers.rs

This file was deleted.

6 changes: 2 additions & 4 deletions tests/origin_parsing.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,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 +9,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 e8bc1fa

Please sign in to comment.