Skip to content

Commit

Permalink
use pretty assertions to help with Windows debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Jan 23, 2024
1 parent d891e10 commit 1372c53
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ path = "src/main.rs"

[dependencies]
diff = "0.1.10"

[dev-dependencies]
pretty_assertions = "1"
2 changes: 1 addition & 1 deletion src/context_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pub fn diff(
#[cfg(test)]
mod tests {
use super::*;

use pretty_assertions::assert_eq;
#[test]
fn test_permutations() {
// test all possible six-line files.
Expand Down
2 changes: 1 addition & 1 deletion src/ed_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ pub fn diff(expected: &[u8], actual: &[u8]) -> Result<Vec<u8>, DiffError> {

#[cfg(test)]
mod tests {

use super::*;
use pretty_assertions::assert_eq;
pub fn diff_w(expected: &[u8], actual: &[u8], filename: &str) -> Result<Vec<u8>, DiffError> {
let mut output = diff(expected, actual)?;
writeln!(&mut output, "w {filename}").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/normal_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub fn diff(expected: &[u8], actual: &[u8]) -> Vec<u8> {
#[cfg(test)]
mod tests {
use super::*;

use pretty_assertions::assert_eq;
#[test]
fn test_permutations() {
let target = "target/normal-diff/";
Expand Down
1 change: 1 addition & 0 deletions src/unified_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ pub fn diff(
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;

#[test]
fn test_permutations() {
Expand Down

0 comments on commit 1372c53

Please sign in to comment.