fix: use path_macro in tests/codegen for cross-platform paths
This commit is contained in:
parent
394f8609a8
commit
64d009615e
25 changed files with 150 additions and 151 deletions
|
|
@ -60,10 +60,11 @@ impl RustyPipeQuery {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::{fs::File, io::BufReader, path::Path};
|
||||
use std::{fs::File, io::BufReader};
|
||||
|
||||
use crate::{client::response, model::ChannelRss};
|
||||
|
||||
use path_macro::path;
|
||||
use rstest::rstest;
|
||||
|
||||
#[rstest]
|
||||
|
|
@ -71,8 +72,7 @@ mod tests {
|
|||
#[case::no_likes("no_likes")]
|
||||
#[case::no_channel_id("no_channel_id")]
|
||||
fn map_channel_rss(#[case] name: &str) {
|
||||
let filename = format!("testfiles/channel_rss/{}.xml", name);
|
||||
let xml_path = Path::new(&filename);
|
||||
let xml_path = path!("testfiles" / "channel_rss" / format!("{}.xml", name));
|
||||
let xml_file = File::open(xml_path).unwrap();
|
||||
|
||||
let feed: response::ChannelRss =
|
||||
|
|
|
|||
Reference in a new issue