Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show diff horizontally aligned? #91

Open
sourcefrog opened this issue Jun 10, 2020 · 0 comments
Open

Show diff horizontally aligned? #91

sourcefrog opened this issue Jun 10, 2020 · 0 comments

Comments

@sourcefrog
Copy link

The string diffs from predicates are great, but would be easier to read if they started in the same column.

I have this code using assert_fs:

    temp.child("subdir")
        .child("subfile")
        .assert("Must I paint you a picture");

I get this output:

---- transport::local::test::write_file stdout ----
thread 'transport::local::test::write_file' panicked at 'Unexpected file, failed var - original <= 0
└── var - original <= 0
    ├── original: Must I paint you a picture
    ├── actual distance: 2
    ├── diff: Must I paint you a picture
Must I paint you a picture?

    └── var as str: Must I paint you a picture?

I would prefer something like this:

---- transport::local::test::write_file stdout ----
thread 'transport::local::test::write_file' panicked at 'Unexpected file, failed var - original <= 0
└── var - original <= 0
    ├── original: Must I paint you a picture
    ├── actual distance: 2
    ├── diff: 
Must I paint you a picture
Must I paint you a picture?
    └── var as str: Must I paint you a picture?

Meta

predicates-rs version: 1.0.4
rustc --version --verbose:

rustc 1.45.0-beta.3359 (b7dc83a3f 2020-06-03)
binary: rustc
commit-hash: b7dc83a3f6ca9746fb3d121761c3605477b77d90
commit-date: 2020-06-03
host: x86_64-apple-darwin
release: 1.45.0-beta.3359
LLVM version: 10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant