Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions fus/src/xml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ mod tests {

#[test]
fn test_parse_version_xml() {
let xml_content = include_str!("../../test-data/version.xml");
let xml_content = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/test-data/version.xml"
));

let info = parse_version_xml(xml_content).unwrap();
assert_eq!(
Expand All @@ -352,7 +355,10 @@ mod tests {

#[test]
fn test_parse_history_xml() {
let xml_content = include_str!("../../test-data/history.xml");
let xml_content = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/test-data/history.xml"
));

let info = parse_history_xml(xml_content).unwrap();
assert_eq!(
Expand Down
1 change: 1 addition & 0 deletions fus/test-data
5 changes: 4 additions & 1 deletion odin/src/usb/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ impl MockBackend {
outgoing_queue: VecDeque::new(),
current_part_index: 0,
packet_size: 0x20000, // default Loke part size
pit_data: include_bytes!("../../../test-data/Q7MQ_EUR_OPENX.pit"),
pit_data: include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/test-data/Q7MQ_EUR_OPENX.pit"
)),
}
}

Expand Down
1 change: 1 addition & 0 deletions odin/test-data
5 changes: 4 additions & 1 deletion pit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ mod tests {

#[test]
fn test_pit_repack() {
let original_bytes = include_bytes!("../../test-data/Q7MQ_EUR_OPENX.pit");
let original_bytes = include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/test-data/Q7MQ_EUR_OPENX.pit"
));
let pit_data = PitData::new(original_bytes).expect("Failed to parse original PIT");
let repacked_bytes = pit_data.pack().expect("Failed to repack PIT");

Expand Down
1 change: 1 addition & 0 deletions pit/test-data