mirror of
https://github.com/uutils/diffutils.git
synced 2026-06-10 15:48:59 -07:00
use pretty assertions to help with Windows debug
This commit is contained in:
@@ -16,3 +16,6 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
diff = "0.1.10"
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1"
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
+1
-1
@@ -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/";
|
||||
|
||||
@@ -384,6 +384,7 @@ pub fn diff(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn test_permutations() {
|
||||
|
||||
Reference in New Issue
Block a user