aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe/tests/advisory/auditor_test.rs18
-rw-r--r--crates/shirabe/tests/advisory/main.rs1
-rw-r--r--crates/shirabe/tests/autoload/autoload_generator_test.rs55
-rw-r--r--crates/shirabe/tests/autoload/main.rs1
-rw-r--r--crates/shirabe/tests/config/json_config_source_test.rs21
-rw-r--r--crates/shirabe/tests/config/main.rs1
6 files changed, 97 insertions, 0 deletions
diff --git a/crates/shirabe/tests/advisory/auditor_test.rs b/crates/shirabe/tests/advisory/auditor_test.rs
index 8c6fafe..28d2600 100644
--- a/crates/shirabe/tests/advisory/auditor_test.rs
+++ b/crates/shirabe/tests/advisory/auditor_test.rs
@@ -1 +1,19 @@
//! ref: composer/tests/Composer/Test/Advisory/AuditorTest.php
+
+// These run the Auditor against a mocked HttpDownloader/IO and packages built from version
+// constraints (parsed via a look-around regex the regex crate cannot compile).
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_audit);
+stub!(test_audit_with_ignore);
+stub!(test_audit_with_ignore_unreachable);
+stub!(test_audit_with_ignore_severity);
+stub!(test_needs_complete_advisory_load);
diff --git a/crates/shirabe/tests/advisory/main.rs b/crates/shirabe/tests/advisory/main.rs
index 357eff7..e0b920d 100644
--- a/crates/shirabe/tests/advisory/main.rs
+++ b/crates/shirabe/tests/advisory/main.rs
@@ -1 +1,2 @@
mod audit_config_test;
+mod auditor_test;
diff --git a/crates/shirabe/tests/autoload/autoload_generator_test.rs b/crates/shirabe/tests/autoload/autoload_generator_test.rs
index 68d3848..ecd6e4e 100644
--- a/crates/shirabe/tests/autoload/autoload_generator_test.rs
+++ b/crates/shirabe/tests/autoload/autoload_generator_test.rs
@@ -1 +1,56 @@
//! ref: composer/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
+
+// These exercise AutoloadGenerator end-to-end: they build packages, write fixture files to
+// a temp dir, run dump() through a mocked InstalledRepository/EventDispatcher and compare
+// the generated autoload files. The integration setup (fixtures, mocks, filesystem) is not
+// ported yet.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_root_package_autoloading);
+stub!(test_root_package_dev_autoloading);
+stub!(test_root_package_dev_autoloading_disabled_by_default);
+stub!(test_vendor_dir_same_as_working_dir);
+stub!(test_root_package_autoloading_alternative_vendor_dir);
+stub!(test_root_package_autoloading_with_target_dir);
+stub!(test_duplicate_files_warning);
+stub!(test_vendors_autoloading);
+stub!(test_vendors_autoloading_with_metapackages);
+stub!(test_non_dev_autoload_exclusion_with_recursion);
+stub!(test_non_dev_autoload_should_include_replaced_packages);
+stub!(test_non_dev_autoload_exclusion_with_recursion_replace);
+stub!(test_non_dev_autoload_replaces_nested_requirements);
+stub!(test_phar_autoload);
+stub!(test_psr_to_class_map_ignores_non_existing_dir);
+stub!(test_psr_to_class_map_ignores_non_psr_classes);
+stub!(test_vendors_class_map_autoloading);
+stub!(test_vendors_class_map_autoloading_with_target_dir);
+stub!(test_class_map_autoloading_empty_dir_and_exact_file);
+stub!(test_class_map_autoloading_authoritative_and_apcu);
+stub!(test_class_map_autoloading_authoritative_and_apcu_prefix);
+stub!(test_files_autoload_generation);
+stub!(test_files_autoload_generation_remove_extra_entities_from_autoload_files);
+stub!(test_files_autoload_order_by_dependencies);
+stub!(test_override_vendors_autoloading);
+stub!(test_include_path_file_generation);
+stub!(test_include_paths_are_prepended_in_autoload_file);
+stub!(test_include_paths_in_root_package);
+stub!(test_include_path_file_without_paths_is_skipped);
+stub!(test_pre_and_post_events_are_dispatched_during_autoload_dump);
+stub!(test_use_global_include_path);
+stub!(test_vendor_dir_excluded_from_working_dir);
+stub!(test_up_level_relative_paths);
+stub!(test_autoload_rules_in_package_that_does_not_exist_on_disk);
+stub!(test_empty_paths);
+stub!(test_vendor_substring_path);
+stub!(test_exclude_from_classmap);
+stub!(test_generates_platform_check);
+stub!(test_absolute_symlink_with_psr4_does_not_generate_warnings);
+stub!(test_absolute_symlink_with_classmap_exclude_from_classmap);
diff --git a/crates/shirabe/tests/autoload/main.rs b/crates/shirabe/tests/autoload/main.rs
index 769d9e8..ebfa8e3 100644
--- a/crates/shirabe/tests/autoload/main.rs
+++ b/crates/shirabe/tests/autoload/main.rs
@@ -1 +1,2 @@
+mod autoload_generator_test;
mod class_loader_test;
diff --git a/crates/shirabe/tests/config/json_config_source_test.rs b/crates/shirabe/tests/config/json_config_source_test.rs
index 7ae61ca..293f32e 100644
--- a/crates/shirabe/tests/config/json_config_source_test.rs
+++ b/crates/shirabe/tests/config/json_config_source_test.rs
@@ -1 +1,22 @@
//! ref: composer/tests/Composer/Test/Config/JsonConfigSourceTest.php
+
+// JsonConfigSource edits composer.json through JsonManipulator, whose text-rewriting
+// operations reach addcslashes (todo!()) in the php-shim.
+macro_rules! stub {
+ ($name:ident) => {
+ #[test]
+ #[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"]
+ fn $name() {
+ todo!()
+ }
+ };
+}
+
+stub!(test_add_repository);
+stub!(test_add_repository_as_list);
+stub!(test_add_repository_with_options);
+stub!(test_remove_repository);
+stub!(test_add_packagist_repository_with_false_value);
+stub!(test_remove_packagist);
+stub!(test_add_link);
+stub!(test_remove_link);
diff --git a/crates/shirabe/tests/config/main.rs b/crates/shirabe/tests/config/main.rs
new file mode 100644
index 0000000..52ceb01
--- /dev/null
+++ b/crates/shirabe/tests/config/main.rs
@@ -0,0 +1 @@
+mod json_config_source_test;