Skip to content

Commit

Permalink
Ignore tests that depend on endianess (#37)
Browse files Browse the repository at this point in the history
Just as [cargo
does](https://github.com/rust-lang/cargo/blob/0871c0e2f4b6d4f95b7408fb8cef8ad3c9c8d834/src/cargo/core/source_id.rs#L930-L936),
ignore the 2 tests that depend on the target being little endian.

Resolves: #36
  • Loading branch information
Jake-Shadle authored Oct 9, 2023
1 parent 73c5e8a commit 5bd057d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ mod test {
use crate::PathBuf;

#[test]
#[cfg(target_endian = "little")]
fn canonicalizes_git_urls() {
let super::UrlDir { dir_name, canonical } = url_to_local_dir("git+https://github.com/EmbarkStudios/cpal.git?rev=d59b4de#d59b4decf72a96932a1482cc27fe4c0b50c40d32").unwrap();

Expand Down Expand Up @@ -321,6 +322,7 @@ mod test {
}

#[test]
#[cfg(target_endian = "little")]
fn matches_cargo() {
assert_eq!(
get_index_details(crate::CRATES_IO_INDEX, Some(PathBuf::new())).unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion tests/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl TreeUpdateBuilder {
i,
Entry {
mode: entry.mode,
oid: entry.oid.clone().into(),
oid: entry.oid.into(),
filename: entry.filename.to_owned(),
},
);
Expand Down

0 comments on commit 5bd057d

Please sign in to comment.