aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
commitf0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch)
treea8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests/util
parentb1571202200e4dc630202928f5ff78959273c7ec (diff)
downloadphp-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/util')
-rw-r--r--crates/shirabe/tests/util/auth_helper_test.rs145
-rw-r--r--crates/shirabe/tests/util/bitbucket_test.rs110
-rw-r--r--crates/shirabe/tests/util/filesystem_test.rs89
-rw-r--r--crates/shirabe/tests/util/git_test.rs57
-rw-r--r--crates/shirabe/tests/util/http/proxy_manager_test.rs70
-rw-r--r--crates/shirabe/tests/util/perforce_test.rs271
-rw-r--r--crates/shirabe/tests/util/process_executor_test.rs82
-rw-r--r--crates/shirabe/tests/util/remote_filesystem_test.rs96
-rw-r--r--crates/shirabe/tests/util/stream_context_factory_test.rs106
-rw-r--r--crates/shirabe/tests/util/svn_test.rs40
10 files changed, 843 insertions, 223 deletions
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!()
+}