Skip to content

Commit

Permalink
Fixed tests which relied on the git checkout's newline endings (bazel…
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre authored and cfredric committed Feb 16, 2022
1 parent 0e77c2e commit e2ebcb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/build_env/tests/manifest_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ pub fn test_manifest_dir() {
let actual = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/src/manifest_dir_file.txt"
));
let expected = "This file tests that CARGO_MANIFEST_DIR is set for the build environment\n";
))
.trim_end();
let expected = "This file tests that CARGO_MANIFEST_DIR is set for the build environment";
assert_eq!(actual, expected);
}
4 changes: 2 additions & 2 deletions test/unit/compile_data/compile_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod test {
/// directly populate the `compile_data` attribute
#[test]
fn test_compile_data_contents() {
assert_eq!(COMPILE_DATA, "compile data contents\n");
assert_eq!(COMPILE_DATA.trim_end(), "compile data contents");
}

/// An extra module that tests the `rust_test` rule wrapping the
Expand All @@ -20,7 +20,7 @@ mod test {

#[test]
fn test_compile_data_contents() {
assert_eq!(TEST_COMPILE_DATA, "test compile data contents\n");
assert_eq!(TEST_COMPILE_DATA.trim_end(), "test compile data contents");
}
}
}

0 comments on commit e2ebcb6

Please sign in to comment.