diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 03:16:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 03:17:45 +0900 |
| commit | 903d37a254f931e79ecded26f30a3b517c6d27da (patch) | |
| tree | 4cd32e55466dd463e10aef35e8fad239dd08938a /crates/shirabe/tests/util/zip_test.rs | |
| parent | d9eb06c836e1faa759225a9653181b1dcd38a52d (diff) | |
| download | php-shirabe-903d37a254f931e79ecded26f30a3b517c6d27da.tar.gz php-shirabe-903d37a254f931e79ecded26f30a3b517c6d27da.tar.zst php-shirabe-903d37a254f931e79ecded26f30a3b517c6d27da.zip | |
test(repository): port InstalledRepositoryTest
testAddRepository maps the expected LogicException to #[should_panic]
since InstalledRepository::add_repository guards with assert!.
testFindPackagesWithReplacersAndProviders is #[ignore] because that
assert omits InstalledRepositoryInterface, so adding an
InstalledArrayRepository panics before the lookup runs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/util/zip_test.rs')
| -rw-r--r-- | crates/shirabe/tests/util/zip_test.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crates/shirabe/tests/util/zip_test.rs b/crates/shirabe/tests/util/zip_test.rs index 07f5629..b80dd17 100644 --- a/crates/shirabe/tests/util/zip_test.rs +++ b/crates/shirabe/tests/util/zip_test.rs @@ -50,7 +50,10 @@ fn test_throws_exception_if_the_composer_json_is_in_a_sub_subfolder() { fn test_returns_composer_json_in_zip_root() { let result = Zip::get_composer_json(&fixture("root.zip")).unwrap(); - assert_eq!(Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), result); + assert_eq!( + Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), + result + ); } #[test] @@ -58,7 +61,10 @@ fn test_returns_composer_json_in_zip_root() { fn test_returns_composer_json_in_first_folder() { let result = Zip::get_composer_json(&fixture("folder.zip")).unwrap(); - assert_eq!(Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), result); + assert_eq!( + Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), + result + ); } #[test] @@ -72,5 +78,8 @@ fn test_multiple_top_level_dirs_is_invalid() { fn test_returns_composer_json_from_first_subfolder() { let result = Zip::get_composer_json(&fixture("single-sub.zip")).unwrap(); - assert_eq!(Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), result); + assert_eq!( + Some("{\n \"name\": \"foo/bar\"\n}\n".to_string()), + result + ); } |
