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

Implement 7z support, fix windows specific symlink issue and UI tests #555

Merged
merged 23 commits into from
Nov 26, 2023

Conversation

Flat
Copy link
Contributor

@Flat Flat commented Nov 25, 2023

Full implementation of #393
Closes #164

tests/ui.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@marcospb19 marcospb19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied the asked changes myself and made a small refactor. 👍

@marcospb19 marcospb19 merged commit a7a65d2 into ouch-org:main Nov 26, 2023
11 checks passed
@marcospb19
Copy link
Member

Thanks for the help!

@Flat Flat deleted the 7zip branch November 26, 2023 01:24
@Flat
Copy link
Contributor Author

Flat commented Nov 26, 2023

Thanks for handling those changes and merging quickly! I think the stuff you reverted should be tested on windows though, while the testing isn't a big deal the symlink handling could be. If you need assistance testing that or somewhere else just let me know!

ouch on  main is 📦 v0.4.2 via 🦀 v1.76.0-nightly
❯ cargo test
   Compiling ouch v0.4.2 (C:\Users\Flat\Documents\dev\ouch)
    Finished test [unoptimized + debuginfo] target(s) in 1m 16s
     Running unittests src\main.rs (target\debug\deps\ouch-cccf543838ac19f3.exe)

running 5 tests
test extension::tests::builds_suggestion_correctly ... ok
test utils::formatting::tests::test_pretty_bytes_formatting ... ok
test extension::tests::test_extensions_from_path ... ok
test cli::args::tests::test_clap_cli_err ... ok
test cli::args::tests::test_clap_cli_ok ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests\integration.rs (target\debug\deps\integration-837358a025335869.exe)

running 6 tests
test utils::src_is_not_tests - should panic ... ok
test utils::src_is_src ... ok
test unpack_rar ... ok
test multiple_files ... ok
test single_empty_file ... ok
test single_file ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.45s

     Running tests\mime.rs (target\debug\deps\mime-3c31897f2e17fcf0.exe)

running 3 tests
test utils::src_is_not_tests - should panic ... ok
test utils::src_is_src ... ok
test sanity_check_through_mime ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.35s

     Running tests\ui.rs (target\debug\deps\ui-5370a5704da03aaf.exe)

running 8 tests
test utils::src_is_not_tests - should panic ... ok
test ui_test_err_decompress_missing_extension ... FAILED
test ui_test_ok_decompress ... FAILED
test ui_test_err_compress_missing_extension ... FAILED
test ui_test_ok_compress ... FAILED
test utils::src_is_src ... ok
test ui_test_usage_help_flag ... ok
test ui_test_err_missing_files ... ok

failures:

---- ui_test_err_decompress_missing_extension stdout ----
thread 'ui_test_err_decompress_missing_extension' panicked at tests\ui.rs:74:41:
called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }

---- ui_test_ok_decompress stdout ----
thread 'ui_test_ok_decompress' panicked at tests\ui.rs:106:35:
called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }

---- ui_test_err_compress_missing_extension stdout ----
thread 'ui_test_err_compress_missing_extension' panicked at tests\ui.rs:65:35:
called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }

---- ui_test_ok_compress stdout ----
thread 'ui_test_ok_compress' panicked at tests\ui.rs:95:35:
called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }


failures:
    ui_test_err_compress_missing_extension
    ui_test_err_decompress_missing_extension
    ui_test_ok_compress
    ui_test_ok_decompress

test result: FAILED. 4 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

error: test failed, to rerun pass `--test ui`

@marcospb19
Copy link
Member

@Flat

Thanks for handling those changes and merging quickly! I think the stuff you reverted should be tested on windows though, while the testing isn't a big deal the symlink handling could be. If you need assistance testing that or somewhere else just let me know!

That's curious... it passes in our Windows CI, but fails locally for you. I didn't know that. (Perhaps our CI uses WSL?)


I agree with you that it would be great to have UI testing for Windows, the problem is, I don't have a Windows machine and our CI isn't covering that case so that I can see the error when it happens.

Even if I could, the feedback loop of developing with CI can be painful, so I'm not sure if I'd be willing to do that, because I already struggle to give Ouch the attention it needs, so I'm reluctant to assume this responsibility.

Windows support right now looks like "tier 2 support", we (hopefully) know it compiles, and run most tests, but not all.

With that said, I'm willing to accept issues and PRs to solve that in case you want to do them, I just won't be able to help as much as I wish I could :v .

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

Successfully merging this pull request may close these issues.

Support .7z
4 participants