diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 13:11:49 +0900 |
| commit | f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch) | |
| tree | a8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests | |
| parent | b1571202200e4dc630202928f5ff78959273c7ec (diff) | |
| download | php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.gz php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.zst php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.zip | |
test(tests): expand stub macros into plain test functions
The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test
functions but obscured the individual test bodies. Expanding them inline
removes the macro indirection so future ports can fill in each function
directly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests')
59 files changed, 4729 insertions, 1283 deletions
diff --git a/crates/shirabe/tests/advisory/auditor_test.rs b/crates/shirabe/tests/advisory/auditor_test.rs index 28d2600..ea0b3c8 100644 --- a/crates/shirabe/tests/advisory/auditor_test.rs +++ b/crates/shirabe/tests/advisory/auditor_test.rs @@ -2,18 +2,32 @@ // 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!() - } - }; +#[test] +#[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] +fn test_audit() { + 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); +#[test] +#[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] +fn test_audit_with_ignore() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] +fn test_audit_with_ignore_unreachable() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] +fn test_audit_with_ignore_severity() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Auditor with mocked HttpDownloader/IO; constraint parsing uses a look-around regex)"] +fn test_needs_complete_advisory_load() { + todo!() +} diff --git a/crates/shirabe/tests/all_functional_test.rs b/crates/shirabe/tests/all_functional_test.rs index 7b3b228..22e495a 100644 --- a/crates/shirabe/tests/all_functional_test.rs +++ b/crates/shirabe/tests/all_functional_test.rs @@ -21,16 +21,16 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (builds composer.phar and runs the functional .test fixtures via the binary)"] - fn $name() { - let _tear_down = TearDown; - todo!() - } - }; +#[test] +#[ignore = "not yet ported (builds composer.phar and runs the functional .test fixtures via the binary)"] +fn test_build_phar() { + let _tear_down = TearDown; + todo!() } -stub!(test_build_phar); -stub!(test_integration); +#[test] +#[ignore = "not yet ported (builds composer.phar and runs the functional .test fixtures via the binary)"] +fn test_integration() { + let _tear_down = TearDown; + todo!() +} diff --git a/crates/shirabe/tests/autoload/autoload_generator_test.rs b/crates/shirabe/tests/autoload/autoload_generator_test.rs index 6b7c11a..0729497 100644 --- a/crates/shirabe/tests/autoload/autoload_generator_test.rs +++ b/crates/shirabe/tests/autoload/autoload_generator_test.rs @@ -26,53 +26,242 @@ impl Drop for TearDown { // 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!() - } - }; +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_root_package_autoloading() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_root_package_dev_autoloading() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_root_package_dev_autoloading_disabled_by_default() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendor_dir_same_as_working_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_root_package_autoloading_alternative_vendor_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_root_package_autoloading_with_target_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_duplicate_files_warning() { + 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); +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendors_autoloading() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendors_autoloading_with_metapackages() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_non_dev_autoload_exclusion_with_recursion() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_non_dev_autoload_should_include_replaced_packages() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_non_dev_autoload_exclusion_with_recursion_replace() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_non_dev_autoload_replaces_nested_requirements() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_phar_autoload() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_psr_to_class_map_ignores_non_existing_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_psr_to_class_map_ignores_non_psr_classes() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendors_class_map_autoloading() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendors_class_map_autoloading_with_target_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_class_map_autoloading_empty_dir_and_exact_file() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_class_map_autoloading_authoritative_and_apcu() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_class_map_autoloading_authoritative_and_apcu_prefix() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_files_autoload_generation() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_files_autoload_generation_remove_extra_entities_from_autoload_files() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_files_autoload_order_by_dependencies() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_override_vendors_autoloading() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_include_path_file_generation() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_include_paths_are_prepended_in_autoload_file() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_include_paths_in_root_package() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_include_path_file_without_paths_is_skipped() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_pre_and_post_events_are_dispatched_during_autoload_dump() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_use_global_include_path() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendor_dir_excluded_from_working_dir() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_up_level_relative_paths() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_autoload_rules_in_package_that_does_not_exist_on_disk() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_empty_paths() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_vendor_substring_path() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_exclude_from_classmap() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_generates_platform_check() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_absolute_symlink_with_psr4_does_not_generate_warnings() { + todo!() +} + +#[test] +#[ignore = "not yet ported (AutoloadGenerator integration: fixtures, mocked installers and generated-file comparison)"] +fn test_absolute_symlink_with_classmap_exclude_from_classmap() { + todo!() +} diff --git a/crates/shirabe/tests/command/base_dependency_command_test.rs b/crates/shirabe/tests/command/base_dependency_command_test.rs index c8ea33a..74a8adf 100644 --- a/crates/shirabe/tests/command/base_dependency_command_test.rs +++ b/crates/shirabe/tests/command/base_dependency_command_test.rs @@ -1,19 +1,43 @@ //! ref: composer/tests/Composer/Test/Command/BaseDependencyCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_when_no_required_parameters() { + todo!() } -stub!(test_exception_when_no_required_parameters); -stub!(test_exception_when_running_locked_without_lock_file); -stub!(test_exception_when_it_could_not_found_the_package); -stub!(test_exception_when_package_was_not_found_in_project); -stub!(test_warning_when_dependencies_are_not_installed); -stub!(test_why_command_outputs); -stub!(test_why_not_command_outputs); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_when_running_locked_without_lock_file() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_when_it_could_not_found_the_package() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_when_package_was_not_found_in_project() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_warning_when_dependencies_are_not_installed() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_why_command_outputs() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_why_not_command_outputs() { + todo!() +} diff --git a/crates/shirabe/tests/command/bump_command_test.rs b/crates/shirabe/tests/command/bump_command_test.rs index 70adc30..a96dcc7 100644 --- a/crates/shirabe/tests/command/bump_command_test.rs +++ b/crates/shirabe/tests/command/bump_command_test.rs @@ -1,15 +1,19 @@ //! ref: composer/tests/Composer/Test/Command/BumpCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_bump() { + todo!() } -stub!(test_bump); -stub!(test_bump_fails_on_non_existing_composer_file); -stub!(test_bump_fails_on_write_error_to_composer_file); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_bump_fails_on_non_existing_composer_file() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_bump_fails_on_write_error_to_composer_file() { + todo!() +} diff --git a/crates/shirabe/tests/command/config_command_test.rs b/crates/shirabe/tests/command/config_command_test.rs index b0e1b97..63bcac7 100644 --- a/crates/shirabe/tests/command/config_command_test.rs +++ b/crates/shirabe/tests/command/config_command_test.rs @@ -1,17 +1,31 @@ //! ref: composer/tests/Composer/Test/Command/ConfigCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_config_updates() { + todo!() } -stub!(test_config_updates); -stub!(test_config_reads); -stub!(test_config_throws_for_invalid_arg_combination); -stub!(test_config_throws_for_invalid_severity); -stub!(test_config_throws_when_merging_array_with_object); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_config_reads() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_config_throws_for_invalid_arg_combination() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_config_throws_for_invalid_severity() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_config_throws_when_merging_array_with_object() { + todo!() +} diff --git a/crates/shirabe/tests/command/dump_autoload_command_test.rs b/crates/shirabe/tests/command/dump_autoload_command_test.rs index 566dc0c..db27ebb 100644 --- a/crates/shirabe/tests/command/dump_autoload_command_test.rs +++ b/crates/shirabe/tests/command/dump_autoload_command_test.rs @@ -1,24 +1,73 @@ //! ref: composer/tests/Composer/Test/Command/DumpAutoloadCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_dump_autoload() { + todo!() } -stub!(test_dump_autoload); -stub!(test_dump_dev_autoload); -stub!(test_dump_no_dev_autoload); -stub!(test_using_optimize_and_strict_psr); -stub!(test_fails_using_strict_psr_if_class_map_violations_are_found); -stub!(test_using_classmap_authoritative); -stub!(test_using_classmap_authoritative_and_strict_psr); -stub!(test_strict_psr_does_not_work_without_optimized_autoloader); -stub!(test_dev_and_no_dev_cannot_be_combined); -stub!(test_with_custom_autoloader_suffix); -stub!(test_with_existing_composer_lock_and_autoloader_suffix); -stub!(test_with_existing_composer_lock_without_autoloader_suffix); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_dump_dev_autoload() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_dump_no_dev_autoload() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_using_optimize_and_strict_psr() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_fails_using_strict_psr_if_class_map_violations_are_found() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_using_classmap_authoritative() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_using_classmap_authoritative_and_strict_psr() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_strict_psr_does_not_work_without_optimized_autoloader() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_dev_and_no_dev_cannot_be_combined() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_with_custom_autoloader_suffix() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_with_existing_composer_lock_and_autoloader_suffix() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_with_existing_composer_lock_without_autoloader_suffix() { + todo!() +} diff --git a/crates/shirabe/tests/command/global_command_test.rs b/crates/shirabe/tests/command/global_command_test.rs index 7877b3c..10ddf6c 100644 --- a/crates/shirabe/tests/command/global_command_test.rs +++ b/crates/shirabe/tests/command/global_command_test.rs @@ -15,23 +15,66 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - let _tear_down = TearDown; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global() { + let _tear_down = TearDown; - todo!() - } - }; + todo!() } -stub!(test_global); -stub!(test_cannot_create_home); -stub!(test_global_show); -stub!(test_global_show_without_packages); -stub!(test_global_require); -stub!(test_global_update); -stub!(test_global_changes_directory); -stub!(test_global_missing_command_name); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_cannot_create_home() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_show() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_show_without_packages() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_require() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_update() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_changes_directory() { + let _tear_down = TearDown; + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_global_missing_command_name() { + let _tear_down = TearDown; + + todo!() +} diff --git a/crates/shirabe/tests/command/init_command_test.rs b/crates/shirabe/tests/command/init_command_test.rs index e7cda3e..043011d 100644 --- a/crates/shirabe/tests/command/init_command_test.rs +++ b/crates/shirabe/tests/command/init_command_test.rs @@ -10,29 +10,114 @@ fn set_up() { server_set("COMPOSER_DEFAULT_EMAIL", "john@example.com".to_string()); } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] - fn $name() { - set_up(); +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_parse_valid_author_string() { + set_up(); - todo!() - } - }; + todo!() } -stub!(test_parse_valid_author_string); -stub!(test_parse_empty_author_string); -stub!(test_parse_author_string_with_invalid_email); -stub!(test_namespace_from_valid_package_name); -stub!(test_namespace_from_invalid_package_name); -stub!(test_namespace_from_missing_package_name); -stub!(test_run_command); -stub!(test_run_command_invalid); -stub!(test_run_guess_name_from_dir_sanitizes_dir); -stub!(test_interactive_run); -stub!(test_format_authors); -stub!(test_get_git_config); -stub!(test_add_vendor_ignore); -stub!(test_has_vendor_ignore); +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_parse_empty_author_string() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_parse_author_string_with_invalid_email() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_namespace_from_valid_package_name() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_namespace_from_invalid_package_name() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_namespace_from_missing_package_name() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_run_command() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_run_command_invalid() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_run_guess_name_from_dir_sanitizes_dir() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_interactive_run() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_format_authors() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_get_git_config() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_add_vendor_ignore() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "needs the ApplicationTester harness or reflection into protected InitCommand helpers"] +fn test_has_vendor_ignore() { + set_up(); + + todo!() +} diff --git a/crates/shirabe/tests/command/install_command_test.rs b/crates/shirabe/tests/command/install_command_test.rs index 9bb5635..1774721 100644 --- a/crates/shirabe/tests/command/install_command_test.rs +++ b/crates/shirabe/tests/command/install_command_test.rs @@ -1,16 +1,25 @@ //! ref: composer/tests/Composer/Test/Command/InstallCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_install_command_errors() { + todo!() } -stub!(test_install_command_errors); -stub!(test_install_from_empty_vendor); -stub!(test_install_from_empty_vendor_no_dev); -stub!(test_install_new_packages_with_existing_partial_vendor); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_install_from_empty_vendor() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_install_from_empty_vendor_no_dev() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_install_new_packages_with_existing_partial_vendor() { + todo!() +} diff --git a/crates/shirabe/tests/command/licenses_command_test.rs b/crates/shirabe/tests/command/licenses_command_test.rs index 26a7520..113a77e 100644 --- a/crates/shirabe/tests/command/licenses_command_test.rs +++ b/crates/shirabe/tests/command/licenses_command_test.rs @@ -6,23 +6,66 @@ fn set_up() { todo!() } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - set_up(); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_basic_run() { + set_up(); - todo!() - } - }; + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_no_dev() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_format_json() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_format_summary() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_format_unknown() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locked() { + set_up(); + + todo!() } -stub!(test_basic_run); -stub!(test_no_dev); -stub!(test_format_json); -stub!(test_format_summary); -stub!(test_format_unknown); -stub!(test_locked); -stub!(test_locked_no_dev); -stub!(test_locked_without_lock_file); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locked_no_dev() { + set_up(); + + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locked_without_lock_file() { + set_up(); + + todo!() +} diff --git a/crates/shirabe/tests/command/remove_command_test.rs b/crates/shirabe/tests/command/remove_command_test.rs index 4e3497a..297d136 100644 --- a/crates/shirabe/tests/command/remove_command_test.rs +++ b/crates/shirabe/tests/command/remove_command_test.rs @@ -1,28 +1,97 @@ //! ref: composer/tests/Composer/Test/Command/RemoveCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_running_with_no_remove_packages() { + todo!() } -stub!(test_exception_running_with_no_remove_packages); -stub!(test_exception_when_running_unused_without_lock_file); -stub!(test_warning_when_removing_non_existent_package); -stub!(test_warning_when_removing_package_from_wrong_type); -stub!(test_warning_when_removing_package_with_deprecated_dependencies_flag); -stub!(test_message_output_when_no_unused_packages_to_remove); -stub!(test_remove_unused_package); -stub!(test_remove_package_by_name); -stub!(test_remove_package_by_name_with_dry_run); -stub!(test_remove_allowed_plugin_package_with_no_other_allowed_plugins); -stub!(test_remove_allowed_plugin_package_with_other_allowed_plugins); -stub!(test_remove_packages_by_vendor); -stub!(test_remove_packages_by_vendor_with_dry_run); -stub!(test_warning_when_removing_packages_by_vendor_from_wrong_type); -stub!(test_package_still_present_error_when_no_install_flag_used); -stub!(test_update_inherited_dependencies_flag_is_passed_to_post_remove_installer); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_exception_when_running_unused_without_lock_file() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_warning_when_removing_non_existent_package() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_warning_when_removing_package_from_wrong_type() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_warning_when_removing_package_with_deprecated_dependencies_flag() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_message_output_when_no_unused_packages_to_remove() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_unused_package() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_package_by_name() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_package_by_name_with_dry_run() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_allowed_plugin_package_with_no_other_allowed_plugins() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_allowed_plugin_package_with_other_allowed_plugins() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_packages_by_vendor() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_packages_by_vendor_with_dry_run() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_warning_when_removing_packages_by_vendor_from_wrong_type() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_package_still_present_error_when_no_install_flag_used() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_update_inherited_dependencies_flag_is_passed_to_post_remove_installer() { + todo!() +} diff --git a/crates/shirabe/tests/command/repository_command_test.rs b/crates/shirabe/tests/command/repository_command_test.rs index 7611785..33a4451 100644 --- a/crates/shirabe/tests/command/repository_command_test.rs +++ b/crates/shirabe/tests/command/repository_command_test.rs @@ -1,28 +1,97 @@ //! ref: composer/tests/Composer/Test/Command/RepositoryCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_list_with_no_repositories() { + todo!() } -stub!(test_list_with_no_repositories); -stub!(test_list_with_repositories_as_list); -stub!(test_list_with_repositories_as_assoc); -stub!(test_add_repository_with_type_and_url); -stub!(test_add_repository_with_json); -stub!(test_remove_repository); -stub!(test_set_and_get_url_in_repository_assoc); -stub!(test_set_and_get_url_in_repository_list); -stub!(test_disable_and_enable_packagist); -stub!(test_invalid_arg_combination_throws); -stub!(test_prepend_repository_by_name_list_to_assoc); -stub!(test_append_repository_by_name_list_to_assoc); -stub!(test_prepend_repository_assoc_with_packagist_disabled); -stub!(test_append_repository_assoc_with_packagist_disabled); -stub!(test_add_before_and_after_by_name); -stub!(test_add_same_name_replaces_existing); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_list_with_repositories_as_list() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_list_with_repositories_as_assoc() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_add_repository_with_type_and_url() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_add_repository_with_json() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_remove_repository() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_set_and_get_url_in_repository_assoc() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_set_and_get_url_in_repository_list() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_disable_and_enable_packagist() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_invalid_arg_combination_throws() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_prepend_repository_by_name_list_to_assoc() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_append_repository_by_name_list_to_assoc() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_prepend_repository_assoc_with_packagist_disabled() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_append_repository_assoc_with_packagist_disabled() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_add_before_and_after_by_name() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_add_same_name_replaces_existing() { + todo!() +} diff --git a/crates/shirabe/tests/command/require_command_test.rs b/crates/shirabe/tests/command/require_command_test.rs index 452892d..470bbe2 100644 --- a/crates/shirabe/tests/command/require_command_test.rs +++ b/crates/shirabe/tests/command/require_command_test.rs @@ -1,16 +1,25 @@ //! ref: composer/tests/Composer/Test/Command/RequireCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_require_throws_if_none_matches() { + todo!() } -stub!(test_require_throws_if_none_matches); -stub!(test_require_warns_if_resolved_to_feature_branch); -stub!(test_require); -stub!(test_inconsistent_require_keys); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_require_warns_if_resolved_to_feature_branch() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_require() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_inconsistent_require_keys() { + todo!() +} diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs index 9ec848d..14766d4 100644 --- a/crates/shirabe/tests/command/run_script_command_test.rs +++ b/crates/shirabe/tests/command/run_script_command_test.rs @@ -1,17 +1,31 @@ //! ref: composer/tests/Composer/Test/Command/RunScriptCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_detect_and_pass_dev_mode_to_event_and_to_dispatching() { + todo!() } -stub!(test_detect_and_pass_dev_mode_to_event_and_to_dispatching); -stub!(test_can_list_scripts); -stub!(test_can_define_aliases); -stub!(test_execution_of_simple_symfony_command); -stub!(test_execution_of_symfony_command_with_configuration); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_can_list_scripts() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_can_define_aliases() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_execution_of_simple_symfony_command() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_execution_of_symfony_command_with_configuration() { + todo!() +} diff --git a/crates/shirabe/tests/command/show_command_test.rs b/crates/shirabe/tests/command/show_command_test.rs index 6c2cf13..b17ce22 100644 --- a/crates/shirabe/tests/command/show_command_test.rs +++ b/crates/shirabe/tests/command/show_command_test.rs @@ -1,35 +1,139 @@ //! ref: composer/tests/Composer/Test/Command/ShowCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show() { + todo!() } -stub!(test_show); -stub!(test_outdated_filters_according_to_platform_reqs_and_warns); -stub!(test_outdated_filters_according_to_platform_reqs_without_warning_for_higher_versions); -stub!(test_show_direct_with_name_does_not_show_transient_dependencies); -stub!(test_show_direct_with_name_only_shows_direct_dependents); -stub!(test_show_platform_only_shows_platform_packages); -stub!(test_show_platform_works_without_composer_json); -stub!(test_outdated_with_zero_major); -stub!(test_show_all_shows_all_sections); -stub!(test_locked_requires_valid_lock_file); -stub!(test_locked_shows_all_locked); -stub!(test_invalid_option_combinations); -stub!(test_ignored_option_combinations); -stub!(test_self_and_name_only); -stub!(test_self_and_package_combination); -stub!(test_self); -stub!(test_not_installed_error); -stub!(test_no_dev_option); -stub!(test_package_filter); -stub!(test_not_existing_package); -stub!(test_not_existing_package_with_working_dir); -stub!(test_specific_package_and_tree); -stub!(test_name_only_prints_no_trailing_whitespace); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_outdated_filters_according_to_platform_reqs_and_warns() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_outdated_filters_according_to_platform_reqs_without_warning_for_higher_versions() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show_direct_with_name_does_not_show_transient_dependencies() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show_direct_with_name_only_shows_direct_dependents() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show_platform_only_shows_platform_packages() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show_platform_works_without_composer_json() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_outdated_with_zero_major() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_show_all_shows_all_sections() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locked_requires_valid_lock_file() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_locked_shows_all_locked() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_invalid_option_combinations() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_ignored_option_combinations() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_self_and_name_only() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_self_and_package_combination() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_self() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_not_installed_error() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_no_dev_option() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_package_filter() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_not_existing_package() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_not_existing_package_with_working_dir() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_specific_package_and_tree() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_name_only_prints_no_trailing_whitespace() { + todo!() +} diff --git a/crates/shirabe/tests/command/suggests_command_test.rs b/crates/shirabe/tests/command/suggests_command_test.rs index 21e9ec7..ca4d9a2 100644 --- a/crates/shirabe/tests/command/suggests_command_test.rs +++ b/crates/shirabe/tests/command/suggests_command_test.rs @@ -1,14 +1,13 @@ //! ref: composer/tests/Composer/Test/Command/SuggestsCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_installed_packages_with_no_suggestions() { + todo!() } -stub!(test_installed_packages_with_no_suggestions); -stub!(test_suggest); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_suggest() { + todo!() +} diff --git a/crates/shirabe/tests/command/update_command_test.rs b/crates/shirabe/tests/command/update_command_test.rs index 35053b0..ceae0eb 100644 --- a/crates/shirabe/tests/command/update_command_test.rs +++ b/crates/shirabe/tests/command/update_command_test.rs @@ -1,19 +1,43 @@ //! ref: composer/tests/Composer/Test/Command/UpdateCommandTest.php -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_update() { + todo!() } -stub!(test_update); -stub!(test_update_with_patch_only); -stub!(test_interactive_mode_throws_if_no_package_to_update); -stub!(test_interactive_mode_throws_if_no_package_entered); -stub!(test_interactive_tmp); -stub!(test_no_security_blocking_allows_insecure_packages); -stub!(test_bump_after_update_without_lockfile); +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_update_with_patch_only() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_interactive_mode_throws_if_no_package_to_update() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_interactive_mode_throws_if_no_package_entered() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_interactive_tmp() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_no_security_blocking_allows_insecure_packages() { + todo!() +} + +#[test] +#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"] +fn test_bump_after_update_without_lockfile() { + todo!() +} diff --git a/crates/shirabe/tests/config/json_config_source_test.rs b/crates/shirabe/tests/config/json_config_source_test.rs index bab36a9..2d101aa 100644 --- a/crates/shirabe/tests/config/json_config_source_test.rs +++ b/crates/shirabe/tests/config/json_config_source_test.rs @@ -33,22 +33,58 @@ impl Drop for TearDown { // 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() { - let _tear_down = set_up(); - todo!() - } - }; +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_add_repository() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_add_repository_as_list() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_add_repository_with_options() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_remove_repository() { + let _tear_down = set_up(); + 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); +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_add_packagist_repository_with_false_value() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_remove_packagist() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_add_link() { + let _tear_down = set_up(); + todo!() +} + +#[test] +#[ignore = "JsonConfigSource uses JsonManipulator, which reaches addcslashes (todo!()) in the php-shim"] +fn test_remove_link() { + let _tear_down = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/config_test.rs b/crates/shirabe/tests/config_test.rs index f44b746..6eddf9b 100644 --- a/crates/shirabe/tests/config_test.rs +++ b/crates/shirabe/tests/config_test.rs @@ -167,35 +167,134 @@ fn test_add_packagist_repository() { // htaccess-protect, var/realpath replacement, oauth, audit, ...) without the env isolation // their setUp/tearDown provides, or exercise plugin-config merge details. They are not // ported yet. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_preferred_install_as_string() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_merge_preferred_install() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_merge_github_oauth() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_var_replacement() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_realpath_replacement() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_stream_wrapper_dirs() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_fetching_relative_paths() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_override_github_protocols() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_git_disabled_by_default_in_github_protocols() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_allowed_urls_pass() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_prohibited_urls_throw_exception() { + todo!() } -stub!(test_preferred_install_as_string); -stub!(test_merge_preferred_install); -stub!(test_merge_github_oauth); -stub!(test_var_replacement); -stub!(test_realpath_replacement); -stub!(test_stream_wrapper_dirs); -stub!(test_fetching_relative_paths); -stub!(test_override_github_protocols); -stub!(test_git_disabled_by_default_in_github_protocols); -stub!(test_allowed_urls_pass); -stub!(test_prohibited_urls_throw_exception); -stub!(test_prohibited_urls_warning_verify_peer); -stub!(test_disable_tls_can_be_overridden); -stub!(test_process_timeout); -stub!(test_htaccess_protect); -stub!(test_get_source_of_value); -stub!(test_get_source_of_value_env_variables); -stub!(test_audit); -stub!(test_get_defaults_to_an_empty_array); -stub!(test_merges_plugin_config); -stub!(test_overrides_global_boolean_plugins_config); -stub!(test_allows_all_plugins_from_local_boolean); +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_prohibited_urls_warning_verify_peer() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_disable_tls_can_be_overridden() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_process_timeout() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_htaccess_protect() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_get_source_of_value() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_get_source_of_value_env_variables() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_audit() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_get_defaults_to_an_empty_array() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_merges_plugin_config() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_overrides_global_boolean_plugins_config() { + todo!() +} + +#[test] +#[ignore = "not yet ported (env-dependent without the setUp/tearDown isolation, or plugin-config merge details)"] +fn test_allows_all_plugins_from_local_boolean() { + todo!() +} diff --git a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs index 979261e..077dd71 100644 --- a/crates/shirabe/tests/dependency_resolver/default_policy_test.rs +++ b/crates/shirabe/tests/dependency_resolver/default_policy_test.rs @@ -51,32 +51,138 @@ impl Drop for TearDown { // These build a Pool from packages and exercise DefaultPolicy::selectPreferredPackages. // Constructing the packages/constraints parses versions through a look-around regex the // regex crate cannot compile, and the setup mirrors the solver fixtures. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] - fn $name() { - let _tear_down = TearDown; - let _fixtures = set_up(); - todo!() - } - }; +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_single() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() } -stub!(test_select_single); -stub!(test_select_newest); -stub!(test_select_newest_picks_latest); -stub!(test_select_newest_picks_latest_stable_with_prefer_stable); -stub!(test_select_lowest_with_prefer_dev_over_prerelease); -stub!(test_select_lowest_prefers_prerelease_over_dev); -stub!(test_select_lowest_with_prefer_stable_still_prefers_stable); -stub!(test_select_newest_with_dev_picks_non_dev); -stub!(test_select_newest_with_preferred_version_picks_preferred_version_if_available); -stub!(test_select_newest_with_preferred_version_picks_newest_otherwise); -stub!(test_select_newest_with_preferred_version_picks_lowest_if_prefer_lowest); -stub!(test_repository_ordering_affects_priority); -stub!(test_select_local_repos_first); -stub!(test_select_all_providers); -stub!(test_prefer_non_replacing_from_same_repo); -stub!(test_prefer_replacing_package_from_same_vendor); -stub!(test_select_lowest); +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_picks_latest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_picks_latest_stable_with_prefer_stable() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_with_prefer_dev_over_prerelease() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_prefers_prerelease_over_dev() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest_with_prefer_stable_still_prefers_stable() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_dev_picks_non_dev() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_preferred_version_if_available() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_newest_otherwise() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_newest_with_preferred_version_picks_lowest_if_prefer_lowest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_repository_ordering_affects_priority() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_local_repos_first() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_all_providers() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_prefer_non_replacing_from_same_repo() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_prefer_replacing_package_from_same_vendor() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (DefaultPolicy over a Pool; constraint parsing uses a look-around regex)"] +fn test_select_lowest() { + let _tear_down = TearDown; + let _fixtures = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/dependency_resolver/solver_test.rs b/crates/shirabe/tests/dependency_resolver/solver_test.rs index 8d41086..b876c99 100644 --- a/crates/shirabe/tests/dependency_resolver/solver_test.rs +++ b/crates/shirabe/tests/dependency_resolver/solver_test.rs @@ -44,54 +44,283 @@ fn set_up() -> Fixtures { // These run the dependency Solver over packages/requests built from version constraints, // whose parsing goes through a look-around regex the regex crate cannot compile; the setup // also mirrors the larger solver fixtures. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] - fn $name() { - let _fixtures = set_up(); - todo!() - } - }; +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_single() { + let _fixtures = set_up(); + todo!() } -stub!(test_solver_install_single); -stub!(test_solver_remove_if_not_requested); -stub!(test_install_non_existing_package_fails); -stub!(test_solver_install_same_package_from_different_repositories); -stub!(test_solver_install_with_deps); -stub!(test_solver_install_honours_not_equal_operator); -stub!(test_solver_install_with_deps_in_order); -stub!(test_solver_multi_package_name_version_resolution_depends_on_require_order); -stub!(test_solver_multi_package_name_version_resolution_is_independent_of_require_order_if_ordered_descending_by_requirement); -stub!(test_solver_fix_locked); -stub!(test_solver_fix_locked_with_alternative); -stub!(test_solver_update_does_only_update); -stub!(test_solver_update_single); -stub!(test_solver_update_all); -stub!(test_solver_update_current); -stub!(test_solver_update_only_updates_selected_package); -stub!(test_solver_update_constrained); -stub!(test_solver_update_fully_constrained); -stub!(test_solver_update_fully_constrained_prunes_installed_packages); -stub!(test_solver_all_jobs); -stub!(test_solver_three_alternative_require_and_conflict); -stub!(test_solver_obsolete); -stub!(test_install_one_of_two_alternatives); -stub!(test_install_provider); -stub!(test_skip_replacer_of_existing_package); -stub!(test_no_install_replacer_of_missing_package); -stub!(test_skip_replaced_package_if_replacer_is_selected); -stub!(test_pick_older_if_newer_conflicts); -stub!(test_install_circular_require); -stub!(test_install_alternative_with_circular_require); -stub!(test_use_replacer_if_necessary); -stub!(test_issue265); -stub!(test_conflict_result_empty); -stub!(test_unsatisfiable_requires); -stub!(test_require_mismatch_exception); -stub!(test_learn_literals_with_sorted_rule_literals); -stub!(test_install_recursive_alias_dependencies); -stub!(test_install_dev_alias); -stub!(test_install_root_aliases_if_alias_of_is_installed); -stub!(test_learn_positive_literal); +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_remove_if_not_requested() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_non_existing_package_fails() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_same_package_from_different_repositories() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_with_deps() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_honours_not_equal_operator() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_install_with_deps_in_order() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_multi_package_name_version_resolution_depends_on_require_order() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_multi_package_name_version_resolution_is_independent_of_require_order_if_ordered_descending_by_requirement() + { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_fix_locked() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_fix_locked_with_alternative() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_does_only_update() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_single() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_all() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_current() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_only_updates_selected_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_constrained() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_fully_constrained() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_update_fully_constrained_prunes_installed_packages() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_all_jobs() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_three_alternative_require_and_conflict() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_solver_obsolete() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_one_of_two_alternatives() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_provider() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_skip_replacer_of_existing_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_no_install_replacer_of_missing_package() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_skip_replaced_package_if_replacer_is_selected() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_pick_older_if_newer_conflicts() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_circular_require() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_alternative_with_circular_require() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_use_replacer_if_necessary() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_issue265() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_conflict_result_empty() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_unsatisfiable_requires() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_require_mismatch_exception() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_learn_literals_with_sorted_rule_literals() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_recursive_alias_dependencies() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_dev_alias() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_install_root_aliases_if_alias_of_is_installed() { + let _fixtures = set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (runs the Solver; constraint parsing uses a look-around regex)"] +fn test_learn_positive_literal() { + let _fixtures = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/downloader/download_manager_test.rs b/crates/shirabe/tests/downloader/download_manager_test.rs index 4bb0f0b..f9c44f4 100644 --- a/crates/shirabe/tests/downloader/download_manager_test.rs +++ b/crates/shirabe/tests/downloader/download_manager_test.rs @@ -7,45 +7,219 @@ fn set_up() { // These mock IO and individual downloaders to drive DownloadManager's selection/download/ // update/remove logic; mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] - fn $name() { - set_up(); - todo!() - } - }; +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_set_get_downloader() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_incorrectly_installed_package() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_correctly_installed_dist_package() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_incorrectly_installed_dist_package() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_correctly_installed_source_package() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_incorrectly_installed_source_package() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_downloader_for_metapackage() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_full_package_download() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_full_package_download_failover() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_bad_package_download() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_dist_only_package_download() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_source_only_package_download() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_metapackage_package_download() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_full_package_download_with_source_preferred() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_dist_only_package_download_with_source_preferred() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_source_only_package_download_with_source_preferred() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_bad_package_download_with_source_preferred() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_update_dist_with_equal_types() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_update_dist_with_not_equal_types() { + set_up(); + todo!() } -stub!(test_set_get_downloader); -stub!(test_get_downloader_for_incorrectly_installed_package); -stub!(test_get_downloader_for_correctly_installed_dist_package); -stub!(test_get_downloader_for_incorrectly_installed_dist_package); -stub!(test_get_downloader_for_correctly_installed_source_package); -stub!(test_get_downloader_for_incorrectly_installed_source_package); -stub!(test_get_downloader_for_metapackage); -stub!(test_full_package_download); -stub!(test_full_package_download_failover); -stub!(test_bad_package_download); -stub!(test_dist_only_package_download); -stub!(test_source_only_package_download); -stub!(test_metapackage_package_download); -stub!(test_full_package_download_with_source_preferred); -stub!(test_dist_only_package_download_with_source_preferred); -stub!(test_source_only_package_download_with_source_preferred); -stub!(test_bad_package_download_with_source_preferred); -stub!(test_update_dist_with_equal_types); -stub!(test_update_dist_with_not_equal_types); -stub!(test_get_available_sources_update_sticks_to_same_source); -stub!(test_update_metapackage); -stub!(test_remove); -stub!(test_metapackage_remove); -stub!(test_install_preference_without_preference_dev); -stub!(test_install_preference_without_preference_no_dev); -stub!(test_install_preference_without_match_dev); -stub!(test_install_preference_without_match_no_dev); -stub!(test_install_preference_with_match_auto_dev); -stub!(test_install_preference_with_match_auto_no_dev); -stub!(test_install_preference_with_match_source); -stub!(test_install_preference_with_match_dist); +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_get_available_sources_update_sticks_to_same_source() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_update_metapackage() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_remove() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_metapackage_remove() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_without_preference_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_without_preference_no_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_without_match_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_without_match_no_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_with_match_auto_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_with_match_auto_no_dev() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_with_match_source() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO and individual downloaders to drive DownloadManager; mocking is not available"] +fn test_install_preference_with_match_dist() { + set_up(); + todo!() +} diff --git a/crates/shirabe/tests/downloader/file_downloader_test.rs b/crates/shirabe/tests/downloader/file_downloader_test.rs index 6e123e1..9e376be 100644 --- a/crates/shirabe/tests/downloader/file_downloader_test.rs +++ b/crates/shirabe/tests/downloader/file_downloader_test.rs @@ -7,23 +7,65 @@ fn set_up() { // These construct a FileDownloader with a mocked IO/HttpDownloader (curl_multi_init todo!()) // and a mocked Cache/Package to drive download/checksum behaviour. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] - fn $name() { - set_up(); - todo!() - } - }; +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_for_package_without_dist_reference() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_to_existing_file() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_get_file_name() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_but_file_is_unsaved() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_with_custom_processed_url() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_with_custom_cache_key() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_cache_garbage_collection_is_called() { + set_up(); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_download_file_with_invalid_checksum() { + set_up(); + todo!() } -stub!(test_download_for_package_without_dist_reference); -stub!(test_download_to_existing_file); -stub!(test_get_file_name); -stub!(test_download_but_file_is_unsaved); -stub!(test_download_with_custom_processed_url); -stub!(test_download_with_custom_cache_key); -stub!(test_cache_garbage_collection_is_called); -stub!(test_download_file_with_invalid_checksum); -stub!(test_downgrade_shows_appropriate_message); +#[test] +#[ignore = "mocks IO/HttpDownloader (curl_multi_init todo!()) and Cache/Package"] +fn test_downgrade_shows_appropriate_message() { + set_up(); + todo!() +} diff --git a/crates/shirabe/tests/downloader/git_downloader_test.rs b/crates/shirabe/tests/downloader/git_downloader_test.rs index ad5e305..c820254 100644 --- a/crates/shirabe/tests/downloader/git_downloader_test.rs +++ b/crates/shirabe/tests/downloader/git_downloader_test.rs @@ -44,31 +44,138 @@ impl Drop for TearDown { // These construct a GitDownloader with a mocked IO/Config and a mocked ProcessExecutor to // feed git command output; mocking is not available, and a real HttpDownloader reaches // curl_multi_init (todo!()). -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] - fn $name() { - let working_dir = set_up(); - let _tear_down = TearDown::new(working_dir.path().to_path_buf()); - let _ = &working_dir; - todo!() - } - }; +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download_for_package_without_source_reference() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download_with_cache() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download_uses_various_protocols_and_sets_push_url_for_github() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download_and_set_push_url_use_custom_various_protocols_for_github() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_download_throws_runtime_exception_if_git_command_fails() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_updatefor_package_without_source_reference() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_update() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_update_with_new_repo_url() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() } -stub!(test_download_for_package_without_source_reference); -stub!(test_download); -stub!(test_download_with_cache); -stub!(test_download_uses_various_protocols_and_sets_push_url_for_github); -stub!(test_download_and_set_push_url_use_custom_various_protocols_for_github); -stub!(test_download_throws_runtime_exception_if_git_command_fails); -stub!(test_updatefor_package_without_source_reference); -stub!(test_update); -stub!(test_update_with_new_repo_url); -stub!(test_update_throws_runtime_exception_if_git_command_fails); -stub!(test_update_doesnt_throws_runtime_exception_if_git_command_fails_at_first_but_is_able_to_recover); -stub!(test_downgrade_shows_appropriate_message); -stub!(test_not_using_downgrading_with_references); -stub!(test_remove); -stub!(test_get_installation_source); +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_update_throws_runtime_exception_if_git_command_fails() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_update_doesnt_throws_runtime_exception_if_git_command_fails_at_first_but_is_able_to_recover() + { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_downgrade_shows_appropriate_message() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_not_using_downgrading_with_references() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_remove() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} + +#[test] +#[ignore = "mocks ProcessExecutor/IO and needs an HttpDownloader (curl_multi_init todo!())"] +fn test_get_installation_source() { + let working_dir = set_up(); + let _tear_down = TearDown::new(working_dir.path().to_path_buf()); + let _ = &working_dir; + todo!() +} diff --git a/crates/shirabe/tests/downloader/zip_downloader_test.rs b/crates/shirabe/tests/downloader/zip_downloader_test.rs index aa4646c..c22afa1 100644 --- a/crates/shirabe/tests/downloader/zip_downloader_test.rs +++ b/crates/shirabe/tests/downloader/zip_downloader_test.rs @@ -47,24 +47,74 @@ impl Drop for TearDown { // These construct a ZipDownloader with a mocked IO/HttpDownloader/ProcessExecutor and rely // on ZipArchive extraction (todo!() in the php-shim) plus mocked unzip behaviour. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] - fn $name() { - let set_up = set_up(); - let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); - let _ = (&set_up.test_dir, &set_up.filename); - todo!() - } - }; +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_error_messages() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_zip_archive_only_failed() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() } -stub!(test_error_messages); -stub!(test_zip_archive_only_failed); -stub!(test_zip_archive_extract_only_failed); -stub!(test_zip_archive_only_good); -stub!(test_system_unzip_only_failed); -stub!(test_system_unzip_only_good); -stub!(test_non_windows_fallback_good); -stub!(test_non_windows_fallback_failed); +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_zip_archive_extract_only_failed() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_zip_archive_only_good() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_system_unzip_only_failed() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_system_unzip_only_good() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_non_windows_fallback_good() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} + +#[test] +#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"] +fn test_non_windows_fallback_failed() { + let set_up = set_up(); + let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf()); + let _ = (&set_up.test_dir, &set_up.filename); + todo!() +} diff --git a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs index 3d9ee0a..8e979a0 100644 --- a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs +++ b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs @@ -17,29 +17,107 @@ impl Drop for TearDown { // These build an EventDispatcher with a mocked Composer/IO/ProcessExecutor and run script // listeners (executing CLI/PHP callbacks); mocking and the script-execution machinery are // not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] - fn $name() { - let _tear_down = TearDown; - todo!() - } - }; +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_listener_exceptions_are_caught() { + let _tear_down = TearDown; + todo!() } -stub!(test_listener_exceptions_are_caught); -stub!(test_dispatcher_can_execute_single_command_line_script); -stub!(test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events); -stub!(test_dispatcher_remove_listener); -stub!(test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack); -stub!(test_dispatcher_can_put_env); -stub!(test_dispatcher_appends_dir_bin_on_path_for_every_listener); -stub!(test_dispatcher_support_for_additional_args); -stub!(test_dispatcher_can_execute_composer_script_groups); -stub!(test_recursion_in_scripts_names); -stub!(test_dispatcher_detect_infinite_recursion); -stub!(test_dispatcher_outputs_command); -stub!(test_dispatcher_outputs_error_on_failed_command); -stub!(test_dispatcher_installer_events); -stub!(test_dispatcher_doesnt_return_skipped_scripts); +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_single_command_line_script() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_remove_listener() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_put_env() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_appends_dir_bin_on_path_for_every_listener() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_support_for_additional_args() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_can_execute_composer_script_groups() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_recursion_in_scripts_names() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_detect_infinite_recursion() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_outputs_command() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_outputs_error_on_failed_command() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_installer_events() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "mocks Composer/IO/ProcessExecutor and executes script listeners; not ported"] +fn test_dispatcher_doesnt_return_skipped_scripts() { + let _tear_down = TearDown; + todo!() +} diff --git a/crates/shirabe/tests/installed_versions_test.rs b/crates/shirabe/tests/installed_versions_test.rs index 163e664..d20bc84 100644 --- a/crates/shirabe/tests/installed_versions_test.rs +++ b/crates/shirabe/tests/installed_versions_test.rs @@ -16,27 +16,93 @@ fn set_up() -> TempDir { root } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] - fn $name() { - let _root = set_up(); - todo!() - } - }; +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_installed_packages() { + let _root = set_up(); + todo!() } -stub!(test_get_installed_packages); -stub!(test_is_installed); -stub!(test_satisfies); -stub!(test_get_version_ranges); -stub!(test_get_version); -stub!(test_get_pretty_version); -stub!(test_get_version_out_of_bounds); -stub!(test_get_root_package); -stub!(test_get_raw_data); -stub!(test_get_reference); -stub!(test_get_installed_packages_by_type); -stub!(test_get_install_path); -stub!(test_with_class_loader_loaded); +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_is_installed() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_satisfies() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_version_ranges() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_version() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_pretty_version() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_version_out_of_bounds() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_root_package() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_raw_data() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_reference() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_installed_packages_by_type() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_get_install_path() { + let _root = set_up(); + todo!() +} + +#[test] +#[ignore = "needs reflection into ClassLoader::registeredLoaders and installed.php fixtures (not ported)"] +fn test_with_class_loader_loaded() { + let _root = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/installer/installation_manager_test.rs b/crates/shirabe/tests/installer/installation_manager_test.rs index 58d0834..b44a814 100644 --- a/crates/shirabe/tests/installer/installation_manager_test.rs +++ b/crates/shirabe/tests/installer/installation_manager_test.rs @@ -8,21 +8,50 @@ fn set_up() { // These mock individual installers, the repository and IO to drive InstallationManager's // add/execute/install/update/uninstall logic; mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_add_get_installer() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_add_remove_installer() { + todo!() } -stub!(test_add_get_installer); -stub!(test_add_remove_installer); -stub!(test_execute); -stub!(test_install); -stub!(test_update_with_equal_types); -stub!(test_update_with_not_equal_types); -stub!(test_uninstall); -stub!(test_install_binary); +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_execute() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_install() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_update_with_equal_types() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_update_with_not_equal_types() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_uninstall() { + todo!() +} + +#[test] +#[ignore = "mocks installers/repository/IO to drive InstallationManager; mocking is not available"] +fn test_install_binary() { + todo!() +} diff --git a/crates/shirabe/tests/installer/library_installer_test.rs b/crates/shirabe/tests/installer/library_installer_test.rs index 1262970..2182962 100644 --- a/crates/shirabe/tests/installer/library_installer_test.rs +++ b/crates/shirabe/tests/installer/library_installer_test.rs @@ -22,22 +22,56 @@ impl Drop for TearDown { // These construct a LibraryInstaller over a temp dir with a mocked IO/Filesystem/repository // and mocked packages to drive install/update/uninstall and path resolution. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_installer_creation_should_not_create_vendor_directory() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_installer_creation_should_not_create_bin_directory() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_is_installed() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_install() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_update() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_uninstall() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_get_install_path_without_target_dir() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_get_install_path_with_target_dir() { + todo!() } -stub!(test_installer_creation_should_not_create_vendor_directory); -stub!(test_installer_creation_should_not_create_bin_directory); -stub!(test_is_installed); -stub!(test_install); -stub!(test_update); -stub!(test_uninstall); -stub!(test_get_install_path_without_target_dir); -stub!(test_get_install_path_with_target_dir); -stub!(test_ensure_binaries_installed); +#[test] +#[ignore = "mocks IO/Filesystem/repository and packages to drive LibraryInstaller; mocking is not available"] +fn test_ensure_binaries_installed() { + todo!() +} diff --git a/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs b/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs index e47a73a..fbdb16f 100644 --- a/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs +++ b/crates/shirabe/tests/installer/suggested_packages_reporter_test.rs @@ -8,24 +8,68 @@ fn set_up() { // These construct a SuggestedPackagesReporter with a mocked IO and assert its accumulated // suggestions and formatted output; mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_constructor() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_get_packages_empty_by_default() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_get_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_add_package_appends() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_add_suggestions_from_package() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_with_no_suggestion_reason() { + todo!() } -stub!(test_constructor); -stub!(test_get_packages_empty_by_default); -stub!(test_get_packages); -stub!(test_add_package_appends); -stub!(test_add_suggestions_from_package); -stub!(test_output); -stub!(test_output_with_no_suggestion_reason); -stub!(test_output_ignores_formatting); -stub!(test_output_multiple_packages); -stub!(test_output_skip_installed_packages); -stub!(test_output_not_getting_installed_packages_when_no_suggestions); +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_ignores_formatting() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_multiple_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_skip_installed_packages() { + todo!() +} + +#[test] +#[ignore = "mocks IO to drive SuggestedPackagesReporter output; mocking is not available"] +fn test_output_not_getting_installed_packages_when_no_suggestions() { + todo!() +} diff --git a/crates/shirabe/tests/installer_test.rs b/crates/shirabe/tests/installer_test.rs index 5e0f941..e4f6c6f 100644 --- a/crates/shirabe/tests/installer_test.rs +++ b/crates/shirabe/tests/installer_test.rs @@ -21,18 +21,30 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"] - fn $name() { - let _tear_down = TearDown; - todo!() - } - }; +#[test] +#[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"] +fn test_installer() { + let _tear_down = TearDown; + todo!() } -stub!(test_installer); -stub!(test_slow_integration); -stub!(test_integration_with_pool_optimizer); -stub!(test_integration_with_raw_pool); +#[test] +#[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"] +fn test_slow_integration() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"] +fn test_integration_with_pool_optimizer() { + let _tear_down = TearDown; + todo!() +} + +#[test] +#[ignore = "not yet ported (end-to-end Installer integration over fixtures; constraint parsing uses a look-around regex)"] +fn test_integration_with_raw_pool() { + let _tear_down = TearDown; + todo!() +} diff --git a/crates/shirabe/tests/io/console_io_test.rs b/crates/shirabe/tests/io/console_io_test.rs index 6715978..a931a8b 100644 --- a/crates/shirabe/tests/io/console_io_test.rs +++ b/crates/shirabe/tests/io/console_io_test.rs @@ -2,26 +2,80 @@ // These mock Symfony's InputInterface/OutputInterface/HelperSet (and QuestionHelper) to // drive ConsoleIO; those console abstractions are not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_is_interactive() { + todo!() } -stub!(test_is_interactive); -stub!(test_write); -stub!(test_write_error); -stub!(test_write_with_multiple_line_string_when_debugging); -stub!(test_overwrite); -stub!(test_ask); -stub!(test_ask_confirmation); -stub!(test_ask_and_validate); -stub!(test_select); -stub!(test_set_and_get_authentication); -stub!(test_get_authentication_when_did_not_set); -stub!(test_has_authentication); -stub!(test_sanitize); +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_write() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_write_error() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_write_with_multiple_line_string_when_debugging() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_overwrite() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_ask() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_ask_confirmation() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_ask_and_validate() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_select() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_set_and_get_authentication() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_get_authentication_when_did_not_set() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_has_authentication() { + todo!() +} + +#[test] +#[ignore = "mocks Symfony Input/Output/HelperSet to drive ConsoleIO; not ported"] +fn test_sanitize() { + todo!() +} diff --git a/crates/shirabe/tests/json/composer_schema_test.rs b/crates/shirabe/tests/json/composer_schema_test.rs index 044bec1..1679b5d 100644 --- a/crates/shirabe/tests/json/composer_schema_test.rs +++ b/crates/shirabe/tests/json/composer_schema_test.rs @@ -2,18 +2,32 @@ // These validate documents against the bundled composer-schema.json via JsonFile's // json-schema validator, which is not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] +fn test_name_pattern() { + todo!() } -stub!(test_name_pattern); -stub!(test_version_pattern); -stub!(test_optional_abandoned_property); -stub!(test_require_types); -stub!(test_minimum_stability_values); +#[test] +#[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] +fn test_version_pattern() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] +fn test_optional_abandoned_property() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] +fn test_require_types() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile schema validation against the bundled composer-schema.json (not ported)"] +fn test_minimum_stability_values() { + todo!() +} diff --git a/crates/shirabe/tests/json/json_file_test.rs b/crates/shirabe/tests/json/json_file_test.rs index 5c632a9..36e1136 100644 --- a/crates/shirabe/tests/json/json_file_test.rs +++ b/crates/shirabe/tests/json/json_file_test.rs @@ -82,74 +82,150 @@ fn test_parse_error_detect_missing_colon() { // The encode cases assert JsonFile::encode output for specific PHP flag combinations and // data shapes (incl. stdClass vs array). Faithful flag mapping and value modeling are not // reproduced here. -macro_rules! encode_stub { - ($name:ident) => { - #[test] - #[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_simple_json_string() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_trailing_backslash() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_format_empty_array() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_escape() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_unicode() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_only_unicode() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_escaped_slashes() { + todo!() } -encode_stub!(test_simple_json_string); -encode_stub!(test_trailing_backslash); -encode_stub!(test_format_empty_array); -encode_stub!(test_escape); -encode_stub!(test_unicode); -encode_stub!(test_only_unicode); -encode_stub!(test_escaped_slashes); -encode_stub!(test_escaped_backslashes); -encode_stub!(test_escaped_unicode); -encode_stub!(test_double_escaped_unicode); +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_escaped_backslashes() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_escaped_unicode() { + todo!() +} + +#[test] +#[ignore = "asserts JsonFile::encode output for specific PHP flag/value combinations; not reproduced here"] +fn test_double_escaped_unicode() { + todo!() +} // These read a fixture composer.json and assert read/write indentation behaviour. -macro_rules! indentation_stub { - ($name:ident) => { - #[test] - #[ignore = "reads a fixture file and asserts indentation behaviour of JsonFile read/write"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "reads a fixture file and asserts indentation behaviour of JsonFile read/write"] +fn test_preserve_indentation_after_read() { + todo!() } -indentation_stub!(test_preserve_indentation_after_read); -indentation_stub!(test_overwrites_indentation_by_default); +#[test] +#[ignore = "reads a fixture file and asserts indentation behaviour of JsonFile read/write"] +fn test_overwrites_indentation_by_default() { + todo!() +} // validateSchema needs the bundled JSON schema and the json-schema validator plus fixtures. -macro_rules! schema_stub { - ($name:ident) => { - #[test] - #[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_schema_validation() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_schema_validation_error() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_schema_validation_lax_additional_properties() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_schema_validation_lax_required() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_custom_schema_validation_lax() { + todo!() +} + +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_custom_schema_validation_strict() { + todo!() } -schema_stub!(test_schema_validation); -schema_stub!(test_schema_validation_error); -schema_stub!(test_schema_validation_lax_additional_properties); -schema_stub!(test_schema_validation_lax_required); -schema_stub!(test_custom_schema_validation_lax); -schema_stub!(test_custom_schema_validation_strict); -schema_stub!(test_auth_schema_validation_with_custom_data_source); +#[test] +#[ignore = "needs JsonFile::validateSchema (json-schema validation) and the schema/fixtures"] +fn test_auth_schema_validation_with_custom_data_source() { + todo!() +} // The merge-conflict cases build large lock-file structures (with VCS conflict markers) and // assert the resulting ParsingException; the fixtures are sizeable and not reproduced here. -macro_rules! merge_stub { - ($name:ident) => { - #[test] - #[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] +fn test_composer_lock_file_merge_conflict_simple() { + todo!() } -merge_stub!(test_composer_lock_file_merge_conflict_simple); -merge_stub!(test_composer_lock_file_merge_conflict_simple_crlf); -merge_stub!(test_composer_lock_file_merge_conflict_complex); -merge_stub!(test_composer_lock_file_merge_conflict_complex_crlf); -merge_stub!(test_composer_lock_file_merge_conflict_extended); +#[test] +#[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] +fn test_composer_lock_file_merge_conflict_simple_crlf() { + todo!() +} + +#[test] +#[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] +fn test_composer_lock_file_merge_conflict_complex() { + todo!() +} + +#[test] +#[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] +fn test_composer_lock_file_merge_conflict_complex_crlf() { + todo!() +} + +#[test] +#[ignore = "builds a large lock-file structure with VCS merge markers; not reproduced here"] +fn test_composer_lock_file_merge_conflict_extended() { + todo!() +} diff --git a/crates/shirabe/tests/json/json_manipulator_test.rs b/crates/shirabe/tests/json/json_manipulator_test.rs index 33af3a9..a3ede89 100644 --- a/crates/shirabe/tests/json/json_manipulator_test.rs +++ b/crates/shirabe/tests/json/json_manipulator_test.rs @@ -3,63 +3,302 @@ // JsonManipulator's text-rewriting operations reach addcslashes, which is todo!() in the // php-shim, so none of these cases can run yet. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_link() { + todo!() } -stub!(test_add_link); -stub!(test_add_link_and_sort_packages); -stub!(test_remove_sub_node); -stub!(test_remove_sub_node_from_require); -stub!(test_remove_sub_node_preserves_object_type_when_empty); -stub!(test_remove_sub_node_preserves_object_type_when_empty2); -stub!(test_add_sub_node_in_require); -stub!(test_add_extra_with_package); -stub!(test_add_config_with_package); -stub!(test_add_suggest_with_package); -stub!(test_add_repository_can_initialize_empty_repositories); -stub!(test_add_repository_can_initialize_from_scratch); -stub!(test_add_repository_can_append); -stub!(test_add_repository_can_prepend); -stub!(test_add_repository); -stub!(test_add_repository_can_override_deep_repos); -stub!(test_set_url_in_repository); -stub!(test_insert_repository_before_and_after_by_name); -stub!(test_remove_repository_removes_from_assoc_but_does_not_converts_from_assoc_to_list); -stub!(test_remove_repository_removes_from_list); -stub!(test_add_repository_converts_from_assoc_to_list); -stub!(test_add_config_setting_escapes); -stub!(test_add_config_setting_works_from_scratch); -stub!(test_add_config_setting_can_add); -stub!(test_add_config_setting_can_overwrite); -stub!(test_add_config_setting_can_overwrite_numbers); -stub!(test_add_config_setting_can_overwrite_arrays); -stub!(test_add_config_setting_can_add_sub_key_in_empty_config); -stub!(test_add_config_setting_can_add_sub_key_in_empty_val); -stub!(test_add_config_setting_can_add_sub_key_in_hash); -stub!(test_add_root_setting_does_not_break_dots); -stub!(test_remove_config_setting_can_remove_sub_key_in_hash); -stub!(test_remove_config_setting_can_remove_sub_key_in_hash_with_siblings); -stub!(test_add_main_key); -stub!(test_add_main_key_with_content_having_dollar_sign_followed_by_digit); -stub!(test_add_main_key_with_content_having_dollar_sign_followed_by_digit2); -stub!(test_update_main_key); -stub!(test_update_main_key2); -stub!(test_update_main_key3); -stub!(test_update_main_key_with_content_having_dollar_sign_followed_by_digit); -stub!(test_remove_main_key); -stub!(test_remove_main_key_if_empty); -stub!(test_remove_main_key_removes_key_where_value_is_null); -stub!(test_indent_detection); -stub!(test_remove_main_key_at_end_of_file); -stub!(test_add_list_item); -stub!(test_remove_list_item); -stub!(test_insert_list_item); -stub!(test_escaped_unicode_does_not_cause_backtrack_limit_error_github_issue8131); -stub!(test_large_file_does_not_cause_backtrack_limit_error_github_issue9595); +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_link_and_sort_packages() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_sub_node() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_sub_node_from_require() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_sub_node_preserves_object_type_when_empty() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_sub_node_preserves_object_type_when_empty2() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_sub_node_in_require() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_extra_with_package() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_with_package() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_suggest_with_package() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_can_initialize_empty_repositories() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_can_initialize_from_scratch() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_can_append() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_can_prepend() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_can_override_deep_repos() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_set_url_in_repository() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_insert_repository_before_and_after_by_name() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_repository_removes_from_assoc_but_does_not_converts_from_assoc_to_list() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_repository_removes_from_list() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_repository_converts_from_assoc_to_list() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_escapes() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_works_from_scratch() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_add() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_overwrite() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_overwrite_numbers() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_overwrite_arrays() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_add_sub_key_in_empty_config() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_add_sub_key_in_empty_val() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_config_setting_can_add_sub_key_in_hash() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_root_setting_does_not_break_dots() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_config_setting_can_remove_sub_key_in_hash() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_config_setting_can_remove_sub_key_in_hash_with_siblings() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_main_key() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_main_key_with_content_having_dollar_sign_followed_by_digit() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_main_key_with_content_having_dollar_sign_followed_by_digit2() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_update_main_key() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_update_main_key2() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_update_main_key3() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_update_main_key_with_content_having_dollar_sign_followed_by_digit() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_main_key() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_main_key_if_empty() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_main_key_removes_key_where_value_is_null() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_indent_detection() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_main_key_at_end_of_file() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_add_list_item() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_remove_list_item() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_insert_list_item() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_escaped_unicode_does_not_cause_backtrack_limit_error_github_issue8131() { + todo!() +} + +#[test] +#[ignore = "JsonManipulator operations reach addcslashes (todo!()) in the php-shim"] +fn test_large_file_does_not_cause_backtrack_limit_error_github_issue9595() { + todo!() +} diff --git a/crates/shirabe/tests/package/archiver/archivable_files_finder_test.rs b/crates/shirabe/tests/package/archiver/archivable_files_finder_test.rs index dcca80a..5454074 100644 --- a/crates/shirabe/tests/package/archiver/archivable_files_finder_test.rs +++ b/crates/shirabe/tests/package/archiver/archivable_files_finder_test.rs @@ -26,16 +26,20 @@ impl Drop for TearDown { // These set up a temp directory tree (including a git repo) and assert the files the finder // selects with manual/git/skip excludes; the git-backed fixture setup is not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "needs a temp directory tree and git-backed fixtures to drive ArchivableFilesFinder; not ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "needs a temp directory tree and git-backed fixtures to drive ArchivableFilesFinder; not ported"] +fn test_manual_excludes() { + todo!() +} + +#[test] +#[ignore = "needs a temp directory tree and git-backed fixtures to drive ArchivableFilesFinder; not ported"] +fn test_git_excludes() { + todo!() } -stub!(test_manual_excludes); -stub!(test_git_excludes); -stub!(test_skip_excludes); +#[test] +#[ignore = "needs a temp directory tree and git-backed fixtures to drive ArchivableFilesFinder; not ported"] +fn test_skip_excludes() { + todo!() +} diff --git a/crates/shirabe/tests/package/archiver/archive_manager_test.rs b/crates/shirabe/tests/package/archiver/archive_manager_test.rs index 912512d..b3b61f8 100644 --- a/crates/shirabe/tests/package/archiver/archive_manager_test.rs +++ b/crates/shirabe/tests/package/archiver/archive_manager_test.rs @@ -28,18 +28,32 @@ impl Drop for TearDown { // These drive ArchiveManager end-to-end (building tar archives via PharData, todo!()) and // the filename-derivation helpers over packages; the archiving and fixture setup are not // ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] +fn test_unknown_format() { + todo!() +} + +#[test] +#[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] +fn test_archive_tar() { + todo!() +} + +#[test] +#[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] +fn test_archive_custom_file_name() { + todo!() +} + +#[test] +#[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] +fn test_get_package_filename_parts() { + todo!() } -stub!(test_unknown_format); -stub!(test_archive_tar); -stub!(test_archive_custom_file_name); -stub!(test_get_package_filename_parts); -stub!(test_get_package_filename); +#[test] +#[ignore = "ArchiveManager builds archives via PharData (todo!()) over fixtures; not ported"] +fn test_get_package_filename() { + todo!() +} diff --git a/crates/shirabe/tests/package/loader/array_loader_test.rs b/crates/shirabe/tests/package/loader/array_loader_test.rs index 79b5d78..2dc4f3e 100644 --- a/crates/shirabe/tests/package/loader/array_loader_test.rs +++ b/crates/shirabe/tests/package/loader/array_loader_test.rs @@ -8,37 +8,163 @@ fn set_up() -> ArrayLoader { // ArrayLoader::load parses version/link constraints through a look-around regex the regex // crate cannot compile. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] - fn $name() { - let _loader = set_up(); - todo!() - } - }; +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_self_version() { + let _loader = set_up(); + todo!() } -stub!(test_self_version); -stub!(test_type_default); -stub!(test_normalized_version_optimization); -stub!(test_parse_dump_default_load_config); -stub!(test_parse_dump_true_load_config); -stub!(test_parse_dump_false_load_config); -stub!(test_package_with_branch_alias); -stub!(test_package_aliasing_without_branch_alias); -stub!(test_abandoned); -stub!(test_not_abandoned); -stub!(test_plugin_api_version_are_kept_as_declared); -stub!(test_plugin_api_version_does_support_self_version); -stub!(test_parse_links_integer_target); -stub!(test_parse_links_invalid_version); -stub!(test_none_string_version); -stub!(test_none_string_source_dist_reference); -stub!(test_branch_alias_integer_index); -stub!(test_package_links_require); -stub!(test_package_links_require_invalid); -stub!(test_package_links_replace); -stub!(test_package_links_replace_invalid); -stub!(test_support_string_value); -stub!(test_invalid_version); +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_type_default() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_normalized_version_optimization() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_default_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_true_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_dump_false_load_config() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_with_branch_alias() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_aliasing_without_branch_alias() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_abandoned() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_not_abandoned() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_plugin_api_version_are_kept_as_declared() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_plugin_api_version_does_support_self_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_links_integer_target() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_parse_links_invalid_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_none_string_version() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_none_string_source_dist_reference() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_branch_alias_integer_index() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_require() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_require_invalid() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_replace() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_package_links_replace_invalid() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_support_string_value() { + let _loader = set_up(); + todo!() +} + +#[test] +#[ignore = "ArrayLoader::load parses constraints via a look-around regex the regex crate cannot compile"] +fn test_invalid_version() { + let _loader = set_up(); + todo!() +} diff --git a/crates/shirabe/tests/package/loader/validating_array_loader_test.rs b/crates/shirabe/tests/package/loader/validating_array_loader_test.rs index 6e4425d..9858df1 100644 --- a/crates/shirabe/tests/package/loader/validating_array_loader_test.rs +++ b/crates/shirabe/tests/package/loader/validating_array_loader_test.rs @@ -2,17 +2,26 @@ // ValidatingArrayLoader wraps ArrayLoader, whose constraint parsing uses a look-around // regex the regex crate cannot compile; the success/warning data sets are large. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_success() { + todo!() } -stub!(test_load_success); -stub!(test_load_failure_throws_exception); -stub!(test_load_warnings); -stub!(test_load_skips_warning_data_when_ignoring_errors); +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_failure_throws_exception() { + todo!() +} + +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_warnings() { + todo!() +} + +#[test] +#[ignore = "ValidatingArrayLoader -> ArrayLoader parses constraints via a look-around regex the regex crate cannot compile"] +fn test_load_skips_warning_data_when_ignoring_errors() { + todo!() +} diff --git a/crates/shirabe/tests/package/locker_test.rs b/crates/shirabe/tests/package/locker_test.rs index 4023c10..7b5d39f 100644 --- a/crates/shirabe/tests/package/locker_test.rs +++ b/crates/shirabe/tests/package/locker_test.rs @@ -3,23 +3,62 @@ // These construct a Locker with a mocked JsonFile/InstallationManager/repository and a // mocked ProcessExecutor to drive lock read/write and freshness checks; mocking is not // available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_locked() { + todo!() } -stub!(test_is_locked); -stub!(test_get_not_locked_packages); -stub!(test_get_locked_packages); -stub!(test_set_lock_data); -stub!(test_lock_bad_packages); -stub!(test_is_fresh); -stub!(test_is_fresh_false); -stub!(test_is_fresh_with_content_hash); -stub!(test_is_fresh_with_content_hash_and_no_hash); -stub!(test_is_fresh_false_with_content_hash); +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_get_not_locked_packages() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_get_locked_packages() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_set_lock_data() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_lock_bad_packages() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_fresh() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_fresh_false() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_fresh_with_content_hash() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_fresh_with_content_hash_and_no_hash() { + todo!() +} + +#[test] +#[ignore = "mocks JsonFile/InstallationManager/repository/ProcessExecutor to drive Locker; mocking is not available"] +fn test_is_fresh_false_with_content_hash() { + todo!() +} diff --git a/crates/shirabe/tests/package/version/version_guesser_test.rs b/crates/shirabe/tests/package/version/version_guesser_test.rs index 9b974dd..75d4ae0 100644 --- a/crates/shirabe/tests/package/version/version_guesser_test.rs +++ b/crates/shirabe/tests/package/version/version_guesser_test.rs @@ -23,30 +23,94 @@ impl Drop for TearDown { // These drive VersionGuesser with a mocked ProcessExecutor feeding git/hg command output; // mocking is not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_hg_guess_version_returns_data() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_guess_version_returns_data() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_guess_version_does_not_see_custom_default_branch_as_non_feature_branch() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_regex() + { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_when_on_non_feature_branch() + { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_detached_head_becomes_dev_hash() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_detached_fetch_head_becomes_dev_hash_git2() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_detached_commit_head_becomes_dev_hash_git2() { + todo!() } -stub!(test_hg_guess_version_returns_data); -stub!(test_guess_version_returns_data); -stub!(test_guess_version_does_not_see_custom_default_branch_as_non_feature_branch); -stub!( - test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming -); -stub!(test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_regex); -stub!(test_guess_version_reads_and_respects_non_feature_branches_configuration_for_arbitrary_naming_when_on_non_feature_branch); -stub!(test_detached_head_becomes_dev_hash); -stub!(test_detached_fetch_head_becomes_dev_hash_git2); -stub!(test_detached_commit_head_becomes_dev_hash_git2); -stub!(test_tag_becomes_version); -stub!(test_tag_becomes_pretty_version); -stub!(test_invalid_tag_becomes_version); -stub!(test_numeric_branches_show_nicely); -stub!(test_remote_branches_are_selected); -stub!(test_get_root_version_from_env); +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_tag_becomes_version() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_tag_becomes_pretty_version() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_invalid_tag_becomes_version() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_numeric_branches_show_nicely() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_remote_branches_are_selected() { + todo!() +} + +#[test] +#[ignore = "mocks a ProcessExecutor feeding git/hg output to drive VersionGuesser; mocking is not available"] +fn test_get_root_version_from_env() { + todo!() +} diff --git a/crates/shirabe/tests/package/version/version_selector_test.rs b/crates/shirabe/tests/package/version/version_selector_test.rs index ccd64ad..fd426ce 100644 --- a/crates/shirabe/tests/package/version/version_selector_test.rs +++ b/crates/shirabe/tests/package/version/version_selector_test.rs @@ -2,26 +2,80 @@ // VersionSelector ranks candidate packages whose versions/constraints are parsed through a // look-around regex the regex crate cannot compile; the setup also mocks a repository. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_latest_version_is_returned() { + todo!() } -stub!(test_latest_version_is_returned); -stub!(test_latest_version_is_returned_that_matches_php_requirements); -stub!(test_latest_version_is_returned_that_matches_ext_requirements); -stub!(test_latest_version_is_returned_that_matches_platform_ext); -stub!(test_latest_version_is_returned_that_matches_composer_requirements); -stub!(test_most_stable_version_is_returned); -stub!(test_most_stable_version_is_returned_regardless_of_order); -stub!(test_highest_version_is_returned); -stub!(test_highest_version_matching_stability_is_returned); -stub!(test_most_stable_unstable_version_is_returned); -stub!(test_default_branch_alias_is_never_returned); -stub!(test_false_returned_on_no_packages); -stub!(test_find_recommended_require_version); +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_latest_version_is_returned_that_matches_php_requirements() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_latest_version_is_returned_that_matches_ext_requirements() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_latest_version_is_returned_that_matches_platform_ext() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_latest_version_is_returned_that_matches_composer_requirements() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_most_stable_version_is_returned() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_most_stable_version_is_returned_regardless_of_order() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_highest_version_is_returned() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_highest_version_matching_stability_is_returned() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_most_stable_unstable_version_is_returned() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_default_branch_alias_is_never_returned() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_false_returned_on_no_packages() { + todo!() +} + +#[test] +#[ignore = "not yet ported (VersionSelector over a mocked repository; constraint parsing uses a look-around regex)"] +fn test_find_recommended_require_version() { + todo!() +} diff --git a/crates/shirabe/tests/plugin/plugin_installer_test.rs b/crates/shirabe/tests/plugin/plugin_installer_test.rs index 1243a49..6442b5c 100644 --- a/crates/shirabe/tests/plugin/plugin_installer_test.rs +++ b/crates/shirabe/tests/plugin/plugin_installer_test.rs @@ -23,29 +23,98 @@ impl Drop for TearDown { // The plugin system requires the PHP runtime to load and instantiate plugin classes; the // PluginManager/PluginInstaller is intentionally not implemented yet (TODO(plugin)). -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_install_new_plugin() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_install_plugin_with_root_package_having_files_autoload() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_install_multiple_plugins() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_upgrade_with_new_class_name() { + todo!() } -stub!(test_install_new_plugin); -stub!(test_install_plugin_with_root_package_having_files_autoload); -stub!(test_install_multiple_plugins); -stub!(test_upgrade_with_new_class_name); -stub!(test_uninstall); -stub!(test_upgrade_with_same_class_name); -stub!(test_register_plugin_only_one_time); -stub!(test_star_plugin_version_works_with_any_api_version); -stub!(test_plugin_constraint_works_only_with_certain_api_version); -stub!(test_plugin_range_constraints_work_only_with_certain_api_version); -stub!(test_command_provider_capability); -stub!(test_incapable_plugin_is_correctly_detected); -stub!(test_capability_implements_composer_plugin_api_class_and_is_constructed_with_args); -stub!(test_querying_with_invalid_capability_class_name_throws); -stub!(test_querying_non_provided_capability_returns_null_safely); -stub!(test_querying_with_non_existing_or_wrong_capability_class_types_throws); +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_uninstall() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_upgrade_with_same_class_name() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_register_plugin_only_one_time() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_star_plugin_version_works_with_any_api_version() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_plugin_constraint_works_only_with_certain_api_version() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_plugin_range_constraints_work_only_with_certain_api_version() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_command_provider_capability() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_incapable_plugin_is_correctly_detected() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_capability_implements_composer_plugin_api_class_and_is_constructed_with_args() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_querying_with_invalid_capability_class_name_throws() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_querying_non_provided_capability_returns_null_safely() { + todo!() +} + +#[test] +#[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] +fn test_querying_with_non_existing_or_wrong_capability_class_types_throws() { + todo!() +} diff --git a/crates/shirabe/tests/repository/composer_repository_test.rs b/crates/shirabe/tests/repository/composer_repository_test.rs index 89c55b5..f600a55 100644 --- a/crates/shirabe/tests/repository/composer_repository_test.rs +++ b/crates/shirabe/tests/repository/composer_repository_test.rs @@ -3,22 +3,57 @@ // These construct a ComposerRepository with a mocked HttpDownloader/IO/Config and parse // provider/package data whose constraints go through a look-around regex; mocking is not // available and a real HttpDownloader reaches curl_multi_init (todo!()). -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_load_data() { + todo!() } -stub!(test_load_data); -stub!(test_what_provides); -stub!(test_search_with_type); -stub!(test_search_with_special_chars); -stub!(test_search_with_abandoned_packages); -stub!(test_canonicalize_url); -stub!(test_get_provider_names_will_return_partial_package_names); -stub!(test_get_security_advisories_assert_repository_http_options_are_used); -stub!(test_get_security_advisories_assert_repository_advisories_is_zero_indexed_array_with_consecutive_keys); +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_what_provides() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_search_with_type() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_search_with_special_chars() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_search_with_abandoned_packages() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_canonicalize_url() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_get_provider_names_will_return_partial_package_names() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_get_security_advisories_assert_repository_http_options_are_used() { + todo!() +} + +#[test] +#[ignore = "mocks HttpDownloader/IO (curl_multi_init todo!()) and parses constraints via a look-around regex"] +fn test_get_security_advisories_assert_repository_advisories_is_zero_indexed_array_with_consecutive_keys() + { + todo!() +} diff --git a/crates/shirabe/tests/repository/filesystem_repository_test.rs b/crates/shirabe/tests/repository/filesystem_repository_test.rs index 74a6794..d798fc9 100644 --- a/crates/shirabe/tests/repository/filesystem_repository_test.rs +++ b/crates/shirabe/tests/repository/filesystem_repository_test.rs @@ -3,19 +3,38 @@ // These read/write installed.json and installed.php fixtures via JsonFile and assert the // generated output; the file IO/manipulation (JsonManipulator reaches addcslashes, todo!()) // and fixtures are not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_repository_read() { + todo!() } -stub!(test_repository_read); -stub!(test_corrupted_repository_file); -stub!(test_unexistent_repository_file); -stub!(test_repository_write); -stub!(test_repository_writes_installed_php); -stub!(test_safely_load_installed_versions); +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_corrupted_repository_file() { + todo!() +} + +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_unexistent_repository_file() { + todo!() +} + +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_repository_write() { + todo!() +} + +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_repository_writes_installed_php() { + todo!() +} + +#[test] +#[ignore = "reads/writes installed.json/installed.php fixtures via JsonFile/JsonManipulator (addcslashes todo!())"] +fn test_safely_load_installed_versions() { + todo!() +} diff --git a/crates/shirabe/tests/repository/platform_repository_test.rs b/crates/shirabe/tests/repository/platform_repository_test.rs index d06f8f5..d19b615 100644 --- a/crates/shirabe/tests/repository/platform_repository_test.rs +++ b/crates/shirabe/tests/repository/platform_repository_test.rs @@ -3,19 +3,38 @@ // These probe runtime/extension/library versions and assert the synthesized platform // packages; the detection mocks ProcessExecutor/Runtime/HhvmDetector and the package // versions are parsed through a look-around regex. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_hhvm_package() { + todo!() } -stub!(test_hhvm_package); -stub!(test_php_version); -stub!(test_inet_pton_regression); -stub!(test_library_information); -stub!(test_composer_platform_version); -stub!(test_valid_platform_packages); +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_php_version() { + todo!() +} + +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_inet_pton_regression() { + todo!() +} + +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_library_information() { + todo!() +} + +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_composer_platform_version() { + todo!() +} + +#[test] +#[ignore = "not yet ported (platform detection mocks Runtime/ProcessExecutor; version parsing uses a look-around regex)"] +fn test_valid_platform_packages() { + todo!() +} diff --git a/crates/shirabe/tests/repository/vcs/git_driver_test.rs b/crates/shirabe/tests/repository/vcs/git_driver_test.rs index c36470c..1aacbf9 100644 --- a/crates/shirabe/tests/repository/vcs/git_driver_test.rs +++ b/crates/shirabe/tests/repository/vcs/git_driver_test.rs @@ -63,25 +63,74 @@ impl Drop for TearDown { } } -macro_rules! git_stub { - ($name:ident) => { - #[test] - #[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] - fn $name() { - let SetUp { - home, - config: _, - network_env, - } = set_up(); - let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); - todo!() - } - }; +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_get_root_identifier_from_remote_local_repository() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() +} + +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_get_root_identifier_from_remote() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() } -git_stub!(test_get_root_identifier_from_remote_local_repository); -git_stub!(test_get_root_identifier_from_remote); -git_stub!(test_get_root_identifier_from_local_with_network_disabled); -git_stub!(test_get_branches_filter_invalid_branch_names); -git_stub!(test_file_get_content_invalid_identifier); -git_stub!(test_get_change_date_invalid_identifier); +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_get_root_identifier_from_local_with_network_disabled() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() +} + +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_get_branches_filter_invalid_branch_names() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() +} + +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_file_get_content_invalid_identifier() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() +} + +#[test] +#[ignore = "constructs a GitDriver and mocks a ProcessExecutor/HttpDownloader (curl_multi_init todo!())"] +fn test_get_change_date_invalid_identifier() { + let SetUp { + home, + config: _, + network_env, + } = set_up(); + let _tear_down = TearDown::new(home.path().to_path_buf(), network_env); + todo!() +} diff --git a/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs b/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs index a9432c4..1e13ada 100644 --- a/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs +++ b/crates/shirabe/tests/repository/vcs/gitlab_driver_test.rs @@ -4,30 +4,104 @@ // HttpDownloader reaches curl_multi_init, todo!()), or — for testSupports — rely on the // gitlab-domains configured in setUp plus the openssl extension, which are not modeled. -macro_rules! gitlab_stub { - ($name:ident) => { - #[test] - #[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_initialize() { + todo!() } -gitlab_stub!(test_initialize); -gitlab_stub!(test_initialize_public_project); -gitlab_stub!(test_initialize_public_project_as_anonymous); -gitlab_stub!(test_initialize_with_port_number); -gitlab_stub!(test_invalid_support_data); -gitlab_stub!(test_get_dist); -gitlab_stub!(test_get_source); -gitlab_stub!(test_get_source_given_public_project); -gitlab_stub!(test_get_tags); -gitlab_stub!(test_get_paginated_refs); -gitlab_stub!(test_get_branches); -gitlab_stub!(test_supports); -gitlab_stub!(test_gitlab_sub_directory); -gitlab_stub!(test_gitlab_sub_group); -gitlab_stub!(test_gitlab_sub_directory_sub_group); -gitlab_stub!(test_forwards_options); -gitlab_stub!(test_protocol_override_repository_url_generation); +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_initialize_public_project() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_initialize_public_project_as_anonymous() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_initialize_with_port_number() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_invalid_support_data() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_dist() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_source() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_source_given_public_project() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_tags() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_paginated_refs() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_get_branches() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_supports() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_gitlab_sub_directory() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_gitlab_sub_group() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_gitlab_sub_directory_sub_group() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_forwards_options() { + todo!() +} + +#[test] +#[ignore = "GitLabDriver tests mock HttpDownloader/IO (curl_multi_init todo!()) or need setUp gitlab-domains config"] +fn test_protocol_override_repository_url_generation() { + todo!() +} diff --git a/crates/shirabe/tests/util/auth_helper_test.rs b/crates/shirabe/tests/util/auth_helper_test.rs index 91bd9dd..9eaeac1 100644 --- a/crates/shirabe/tests/util/auth_helper_test.rs +++ b/crates/shirabe/tests/util/auth_helper_test.rs @@ -9,33 +9,122 @@ fn set_up() { todo!() } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_without_auth_credentials() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_bearer_password() { + todo!() } -stub!(test_add_authentication_header_without_auth_credentials); -stub!(test_add_authentication_header_with_bearer_password); -stub!(test_add_authentication_header_with_github_token); -stub!(test_add_authentication_header_with_gitlab_oath_token); -stub!(test_add_authentication_options_for_client_certificate); -stub!(test_add_authentication_header_with_gitlab_private_token); -stub!(test_add_authentication_header_with_bitbucket_oath_token); -stub!(test_add_authentication_header_with_bitbucket_public_url); -stub!(test_add_authentication_header_with_basic_http_authentication); -stub!(test_add_authentication_header_with_custom_headers); -stub!(test_is_public_bit_bucket_download_with_bitbucket_public_url); -stub!(test_is_public_bit_bucket_download_with_non_bitbucket_public_url); -stub!(test_store_auth_automatically); -stub!(test_store_auth_with_prompt_yes_answer); -stub!(test_store_auth_with_prompt_no_answer); -stub!(test_store_auth_with_prompt_invalid_answer); -stub!(test_prompt_auth_if_needed_git_lab_no_auth_change); -stub!(test_prompt_auth_if_needed_multiple_bitbucket_downloads); -stub!(test_add_authentication_header_is_working); -stub!(test_add_authentication_header_deprecation); +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_github_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_gitlab_oath_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_options_for_client_certificate() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_gitlab_private_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_bitbucket_oath_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_bitbucket_public_url() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_basic_http_authentication() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_with_custom_headers() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_is_public_bit_bucket_download_with_bitbucket_public_url() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_is_public_bit_bucket_download_with_non_bitbucket_public_url() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_store_auth_automatically() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_store_auth_with_prompt_yes_answer() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_store_auth_with_prompt_no_answer() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_store_auth_with_prompt_invalid_answer() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_prompt_auth_if_needed_git_lab_no_auth_change() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_prompt_auth_if_needed_multiple_bitbucket_downloads() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_is_working() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config to drive AuthHelper; mocking is not available"] +fn test_add_authentication_header_deprecation() { + todo!() +} diff --git a/crates/shirabe/tests/util/bitbucket_test.rs b/crates/shirabe/tests/util/bitbucket_test.rs index a89b85e..4087294 100644 --- a/crates/shirabe/tests/util/bitbucket_test.rs +++ b/crates/shirabe/tests/util/bitbucket_test.rs @@ -9,28 +9,92 @@ fn set_up() { todo!() } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_valid_oauth_consumer() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_valid_oauth_consumer_and_valid_stored_access_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_valid_oauth_consumer_and_expired_access_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_username_and_password() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_username_and_password_with_unauthorized_response() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_request_access_token_with_username_and_password_with_not_found_response() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_username_password_authentication_flow() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_interactively_with_empty_username() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_interactively_with_empty_password() { + todo!() } -stub!(test_request_access_token_with_valid_oauth_consumer); -stub!(test_request_access_token_with_valid_oauth_consumer_and_valid_stored_access_token); -stub!(test_request_access_token_with_valid_oauth_consumer_and_expired_access_token); -stub!(test_request_access_token_with_username_and_password); -stub!(test_request_access_token_with_username_and_password_with_unauthorized_response); -stub!(test_request_access_token_with_username_and_password_with_not_found_response); -stub!(test_username_password_authentication_flow); -stub!(test_authorize_oauth_interactively_with_empty_username); -stub!(test_authorize_oauth_interactively_with_empty_password); -stub!(test_authorize_oauth_interactively_with_request_access_token_failure); -stub!(test_get_token_without_access_token); -stub!(test_get_token_with_access_token); -stub!(test_authorize_oauth_with_wrong_origin_url); -stub!(test_authorize_oauth_without_available_git_config_token); -stub!(test_authorize_oauth_with_available_git_config_token); +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_interactively_with_request_access_token_failure() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_get_token_without_access_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_get_token_with_access_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_with_wrong_origin_url() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_without_available_git_config_token() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) for the Bitbucket OAuth flow"] +fn test_authorize_oauth_with_available_git_config_token() { + todo!() +} diff --git a/crates/shirabe/tests/util/filesystem_test.rs b/crates/shirabe/tests/util/filesystem_test.rs index e101c79..39fa256 100644 --- a/crates/shirabe/tests/util/filesystem_test.rs +++ b/crates/shirabe/tests/util/filesystem_test.rs @@ -51,25 +51,74 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_find_shortest_path_code() { + todo!() } -stub!(test_find_shortest_path_code); -stub!(test_find_shortest_path); -stub!(test_remove_directory_php); -stub!(test_file_size); -stub!(test_directory_size); -stub!(test_normalize_path); -stub!(test_unlink_symlinked_directory); -stub!(test_remove_symlinked_directory_with_trailing_slash); -stub!(test_junctions); -stub!(test_override_junctions); -stub!(test_copy); -stub!(test_copy_then_remove); +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_find_shortest_path() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_remove_directory_php() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_file_size() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_directory_size() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_normalize_path() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_unlink_symlinked_directory() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_remove_symlinked_directory_with_trailing_slash() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_junctions() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_override_junctions() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_copy() { + todo!() +} + +#[test] +#[ignore = "not yet ported (Filesystem path helpers plus on-disk size/copy/symlink/junction fixtures)"] +fn test_copy_then_remove() { + todo!() +} diff --git a/crates/shirabe/tests/util/git_test.rs b/crates/shirabe/tests/util/git_test.rs index 4802180..a78ae88 100644 --- a/crates/shirabe/tests/util/git_test.rs +++ b/crates/shirabe/tests/util/git_test.rs @@ -9,20 +9,47 @@ fn set_up() { todo!() } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_run_command_public_git_hub_repository_not_initial_clone() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_run_command_private_git_hub_repository_not_initial_clone_not_interactive_without_authentication() + { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_run_command_private_git_hub_repository_not_initial_clone_not_interactive_with_authentication() + { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_run_command_private_bitbucket_repository_not_initial_clone_not_interactive_with_authentication() + { + todo!() } -stub!(test_run_command_public_git_hub_repository_not_initial_clone); -stub!(test_run_command_private_git_hub_repository_not_initial_clone_not_interactive_without_authentication); -stub!(test_run_command_private_git_hub_repository_not_initial_clone_not_interactive_with_authentication); -stub!(test_run_command_private_bitbucket_repository_not_initial_clone_not_interactive_with_authentication); -stub!(test_run_command_private_bitbucket_repository_not_initial_clone_interactive_with_oauth); -stub!(test_sync_mirror_sanitizes_url_after_initial_clone); -stub!(test_sync_mirror_sanitizes_url_even_after_failed_update); +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_run_command_private_bitbucket_repository_not_initial_clone_interactive_with_oauth() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_sync_mirror_sanitizes_url_after_initial_clone() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/ProcessExecutor to drive Git; mocking is not available"] +fn test_sync_mirror_sanitizes_url_even_after_failed_update() { + todo!() +} diff --git a/crates/shirabe/tests/util/http/proxy_manager_test.rs b/crates/shirabe/tests/util/http/proxy_manager_test.rs index 0ed059d..0c177f7 100644 --- a/crates/shirabe/tests/util/http/proxy_manager_test.rs +++ b/crates/shirabe/tests/util/http/proxy_manager_test.rs @@ -37,22 +37,58 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] - fn $name() { - let _tear_down = TearDown; - set_up(); - todo!() - } - }; +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_instantiation() { + let _tear_down = TearDown; + set_up(); + todo!() } -stub!(test_instantiation); -stub!(test_get_proxy_for_request_throws_on_bad_proxy_url); -stub!(test_lowercase_overrides_uppercase); -stub!(test_cgi_proxy_is_only_used_when_no_http_proxy); -stub!(test_no_http_proxy_does_not_use_https_proxy); -stub!(test_no_https_proxy_does_not_use_http_proxy); -stub!(test_get_proxy_for_request); +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_get_proxy_for_request_throws_on_bad_proxy_url() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_lowercase_overrides_uppercase() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_cgi_proxy_is_only_used_when_no_http_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_no_http_proxy_does_not_use_https_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_no_https_proxy_does_not_use_http_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (ProxyManager is driven by proxy environment variables)"] +fn test_get_proxy_for_request() { + let _tear_down = TearDown; + set_up(); + todo!() +} diff --git a/crates/shirabe/tests/util/perforce_test.rs b/crates/shirabe/tests/util/perforce_test.rs index 59b9fd8..fb517ba 100644 --- a/crates/shirabe/tests/util/perforce_test.rs +++ b/crates/shirabe/tests/util/perforce_test.rs @@ -10,51 +10,230 @@ fn set_up() { todo!() } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_client_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_client_from_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_stream_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_stream_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_stream_without_label_with_stream_without_label() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_stream_without_label_with_stream_with_label() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_client_spec() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_generate_p4_command() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_with_user_already_set() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_with_user_set_in_p4_variables_with_windows_os() { + todo!() } -stub!(test_get_client_without_stream); -stub!(test_get_client_from_stream); -stub!(test_get_stream_without_stream); -stub!(test_get_stream_with_stream); -stub!(test_get_stream_without_label_with_stream_without_label); -stub!(test_get_stream_without_label_with_stream_with_label); -stub!(test_get_client_spec); -stub!(test_generate_p4_command); -stub!(test_query_p4_user_with_user_already_set); -stub!(test_query_p4_user_with_user_set_in_p4_variables_with_windows_os); -stub!(test_query_p4_user_with_user_set_in_p4_variables_not_windows_os); -stub!(test_query_p4_user_queries_for_user); -stub!(test_query_p4_user_stores_response_to_query_for_user_with_windows); -stub!(test_query_p4_user_stores_response_to_query_for_user_without_windows); -stub!(test_query_p4_user_escapes_injection_on_windows); -stub!(test_query_p4_user_escapes_injection_on_unix); -stub!(test_query_p4_password_with_password_already_set); -stub!(test_query_p4_password_with_password_set_in_p4_variables_with_windows_os); -stub!(test_query_p4_password_with_password_set_in_p4_variables_not_windows_os); -stub!(test_query_p4_password_queries_for_password); -stub!(test_write_p4_client_spec_without_stream); -stub!(test_write_p4_client_spec_with_stream); -stub!(test_is_logged_in); -stub!(test_get_branches_with_stream); -stub!(test_get_branches_without_stream); -stub!(test_get_tags_without_stream); -stub!(test_get_tags_with_stream); -stub!(test_check_stream_without_stream); -stub!(test_check_stream_with_stream); -stub!(test_get_composer_information_without_label_without_stream); -stub!(test_get_composer_information_with_label_without_stream); -stub!(test_get_composer_information_without_label_with_stream); -stub!(test_get_composer_information_with_label_with_stream); -stub!(test_sync_code_base_without_stream); -stub!(test_sync_code_base_with_stream); -stub!(test_check_server_exists); -stub!(test_check_server_client_error); -stub!(test_cleanup_client_spec_should_delete_client); +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_with_user_set_in_p4_variables_not_windows_os() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_queries_for_user() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_stores_response_to_query_for_user_with_windows() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_stores_response_to_query_for_user_without_windows() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_escapes_injection_on_windows() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_user_escapes_injection_on_unix() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_password_with_password_already_set() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_password_with_password_set_in_p4_variables_with_windows_os() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_password_with_password_set_in_p4_variables_not_windows_os() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_query_p4_password_queries_for_password() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_write_p4_client_spec_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_write_p4_client_spec_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_is_logged_in() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_branches_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_branches_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_tags_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_tags_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_check_stream_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_check_stream_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_composer_information_without_label_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_composer_information_with_label_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_composer_information_without_label_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_get_composer_information_with_label_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_sync_code_base_without_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_sync_code_base_with_stream() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_check_server_exists() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_check_server_client_error() { + todo!() +} + +#[test] +#[ignore = "mocks IO/ProcessExecutor to drive Perforce; mocking is not available"] +fn test_cleanup_client_spec_should_delete_client() { + todo!() +} diff --git a/crates/shirabe/tests/util/process_executor_test.rs b/crates/shirabe/tests/util/process_executor_test.rs index bfc6e0c..88449f1 100644 --- a/crates/shirabe/tests/util/process_executor_test.rs +++ b/crates/shirabe/tests/util/process_executor_test.rs @@ -3,24 +3,68 @@ // These run real subprocesses (capturing output/stderr/timeout) and assert ProcessExecutor's // password hiding, line splitting and argument escaping; the subprocess execution and mocked // IO are not ported. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_captures_output() { + todo!() } -stub!(test_execute_captures_output); -stub!(test_execute_outputs_if_not_captured); -stub!(test_use_io_is_not_null_and_if_not_captured); -stub!(test_execute_captures_stderr); -stub!(test_timeout); -stub!(test_hide_passwords); -stub!(test_doesnt_hide_ports); -stub!(test_split_lines); -stub!(test_console_io_does_not_format_symfony_console_style); -stub!(test_execute_async_cancel); -stub!(test_escape_argument); +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_outputs_if_not_captured() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_use_io_is_not_null_and_if_not_captured() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_captures_stderr() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_timeout() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_hide_passwords() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_doesnt_hide_ports() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_split_lines() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_console_io_does_not_format_symfony_console_style() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_execute_async_cancel() { + todo!() +} + +#[test] +#[ignore = "not yet ported (runs subprocesses / mocks IO; argument-escaping and split helpers included)"] +fn test_escape_argument() { + todo!() +} diff --git a/crates/shirabe/tests/util/remote_filesystem_test.rs b/crates/shirabe/tests/util/remote_filesystem_test.rs index 7b8fa2e..1fc9f7e 100644 --- a/crates/shirabe/tests/util/remote_filesystem_test.rs +++ b/crates/shirabe/tests/util/remote_filesystem_test.rs @@ -3,26 +3,80 @@ // These mock IO/Config/HttpDownloader and use reflection to drive RemoteFilesystem option // building and downloads; mocking/reflection are not available and a real HttpDownloader // reaches curl_multi_init (todo!()). -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_options_for_url() { + todo!() } -stub!(test_get_options_for_url); -stub!(test_get_options_for_url_with_authorization); -stub!(test_get_options_for_url_with_stream_options); -stub!(test_get_options_for_url_with_call_options_keeps_header); -stub!(test_callback_get_file_size); -stub!(test_callback_get_notify_progress); -stub!(test_callback_get_passes_through404); -stub!(test_get_contents); -stub!(test_copy); -stub!(test_copy_with_no_retry_on_failure); -stub!(test_copy_with_success_on_retry); -stub!(test_get_options_for_url_creates_secure_tls_defaults); -stub!(test_bit_bucket_public_download); +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_options_for_url_with_authorization() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_options_for_url_with_stream_options() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_options_for_url_with_call_options_keeps_header() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_callback_get_file_size() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_callback_get_notify_progress() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_callback_get_passes_through404() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_contents() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_copy() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_copy_with_no_retry_on_failure() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_copy_with_success_on_retry() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_get_options_for_url_creates_secure_tls_defaults() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config/HttpDownloader (curl_multi_init todo!()) and uses reflection; not ported"] +fn test_bit_bucket_public_download() { + todo!() +} diff --git a/crates/shirabe/tests/util/stream_context_factory_test.rs b/crates/shirabe/tests/util/stream_context_factory_test.rs index f75c78d..f58ee75 100644 --- a/crates/shirabe/tests/util/stream_context_factory_test.rs +++ b/crates/shirabe/tests/util/stream_context_factory_test.rs @@ -34,26 +34,90 @@ impl Drop for TearDown { } } -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] - fn $name() { - let _tear_down = TearDown; - set_up(); - todo!() - } - }; +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_get_context() { + let _tear_down = TearDown; + set_up(); + todo!() } -stub!(test_get_context); -stub!(test_http_proxy); -stub!(test_http_proxy_with_no_proxy); -stub!(test_http_proxy_with_no_proxy_wildcard); -stub!(test_options_are_preserved); -stub!(test_http_proxy_without_port); -stub!(test_https_proxy_override); -stub!(test_ssl_proxy); -stub!(test_ensure_thatfix_http_header_field_moves_content_type_to_end_of_options); -stub!(test_init_options_does_include_proxy_auth_headers); -stub!(test_init_options_for_curl_does_not_include_proxy_auth_headers); +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_http_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_http_proxy_with_no_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_http_proxy_with_no_proxy_wildcard() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_options_are_preserved() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_http_proxy_without_port() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_https_proxy_override() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_ssl_proxy() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_ensure_thatfix_http_header_field_moves_content_type_to_end_of_options() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_init_options_does_include_proxy_auth_headers() { + let _tear_down = TearDown; + set_up(); + todo!() +} + +#[test] +#[ignore = "not yet ported (StreamContextFactory proxy/option building is driven by proxy env vars)"] +fn test_init_options_for_curl_does_not_include_proxy_auth_headers() { + let _tear_down = TearDown; + set_up(); + todo!() +} diff --git a/crates/shirabe/tests/util/svn_test.rs b/crates/shirabe/tests/util/svn_test.rs index 018a158..5e2775f 100644 --- a/crates/shirabe/tests/util/svn_test.rs +++ b/crates/shirabe/tests/util/svn_test.rs @@ -2,18 +2,32 @@ // These mock IO/Config and use reflection to drive Svn's credential handling; mocking and // reflection are not available here. -macro_rules! stub { - ($name:ident) => { - #[test] - #[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] - fn $name() { - todo!() - } - }; +#[test] +#[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] +fn test_credentials() { + todo!() } -stub!(test_credentials); -stub!(test_interactive_string); -stub!(test_credentials_from_config); -stub!(test_credentials_from_config_with_cache_credentials_true); -stub!(test_credentials_from_config_with_cache_credentials_false); +#[test] +#[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] +fn test_interactive_string() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] +fn test_credentials_from_config() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] +fn test_credentials_from_config_with_cache_credentials_true() { + todo!() +} + +#[test] +#[ignore = "mocks IO/Config and uses reflection to drive Svn credentials; not ported"] +fn test_credentials_from_config_with_cache_credentials_false() { + todo!() +} |
