aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe/tests/autoload/class_loader_test.rs25
-rw-r--r--crates/shirabe/tests/autoload/main.rs1
-rw-r--r--crates/shirabe/tests/command/main.rs1
-rw-r--r--crates/shirabe/tests/command/reinstall_command_test.rs6
-rw-r--r--crates/shirabe/tests/util/http_downloader_test.rs12
-rw-r--r--crates/shirabe/tests/util/main.rs1
6 files changed, 46 insertions, 0 deletions
diff --git a/crates/shirabe/tests/autoload/class_loader_test.rs b/crates/shirabe/tests/autoload/class_loader_test.rs
index 02fb48f..68a0ba4 100644
--- a/crates/shirabe/tests/autoload/class_loader_test.rs
+++ b/crates/shirabe/tests/autoload/class_loader_test.rs
@@ -1 +1,26 @@
//! ref: composer/tests/Composer/Test/Autoload/ClassLoaderTest.php
+
+use shirabe::autoload::class_loader::ClassLoader;
+
+// In PHP, loadClass() includes the matching .php fixture and the assertion checks
+// class_exists(). There is no equivalent runtime notion of loading and defining a
+// class in Rust, so this case cannot be ported faithfully.
+#[test]
+#[ignore = "relies on PHP loadClass()/class_exists() runtime class loading, which has no Rust equivalent"]
+fn test_load_class() {
+ todo!()
+}
+
+#[test]
+fn test_get_prefixes_with_no_psr0_configuration() {
+ let loader = ClassLoader::new(None);
+ assert!(loader.get_prefixes().is_empty());
+}
+
+// In PHP this serializes the loader and unserializes it, then compares every getter.
+// PHP serialize()/unserialize() has no Rust equivalent here.
+#[test]
+#[ignore = "relies on PHP serialize()/unserialize() round-tripping of the ClassLoader, which is not ported"]
+fn test_serializability() {
+ todo!()
+}
diff --git a/crates/shirabe/tests/autoload/main.rs b/crates/shirabe/tests/autoload/main.rs
new file mode 100644
index 0000000..769d9e8
--- /dev/null
+++ b/crates/shirabe/tests/autoload/main.rs
@@ -0,0 +1 @@
+mod class_loader_test;
diff --git a/crates/shirabe/tests/command/main.rs b/crates/shirabe/tests/command/main.rs
index fd40768..381649a 100644
--- a/crates/shirabe/tests/command/main.rs
+++ b/crates/shirabe/tests/command/main.rs
@@ -3,3 +3,4 @@ mod audit_command_test;
mod clear_cache_command_test;
mod diagnose_command_test;
mod exec_command_test;
+mod reinstall_command_test;
diff --git a/crates/shirabe/tests/command/reinstall_command_test.rs b/crates/shirabe/tests/command/reinstall_command_test.rs
index 3cf6712..df0b618 100644
--- a/crates/shirabe/tests/command/reinstall_command_test.rs
+++ b/crates/shirabe/tests/command/reinstall_command_test.rs
@@ -1 +1,7 @@
//! ref: composer/tests/Composer/Test/Command/ReinstallCommandTest.php
+
+#[test]
+#[ignore = "requires the ApplicationTester/initTempComposer harness, which is not yet ported"]
+fn test_reinstall_command() {
+ todo!()
+}
diff --git a/crates/shirabe/tests/util/http_downloader_test.rs b/crates/shirabe/tests/util/http_downloader_test.rs
index e7fcb7b..238fe83 100644
--- a/crates/shirabe/tests/util/http_downloader_test.rs
+++ b/crates/shirabe/tests/util/http_downloader_test.rs
@@ -1 +1,13 @@
//! ref: composer/tests/Composer/Test/Util/HttpDownloaderTest.php
+
+#[test]
+#[ignore = "constructs a real HttpDownloader (curl_multi_init is todo!()) and mocks a Config; performs a network request"]
+fn test_capture_authentication_params_from_url() {
+ todo!()
+}
+
+#[test]
+#[ignore = "constructs a real HttpDownloader (curl_multi_init is todo!()) and mocks a Config; performs a network request"]
+fn test_output_warnings() {
+ todo!()
+}
diff --git a/crates/shirabe/tests/util/main.rs b/crates/shirabe/tests/util/main.rs
index 4327bda..6165e54 100644
--- a/crates/shirabe/tests/util/main.rs
+++ b/crates/shirabe/tests/util/main.rs
@@ -2,6 +2,7 @@ mod config_validator_test;
mod error_handler_test;
mod forgejo_url_test;
mod http;
+mod http_downloader_test;
mod metadata_minifier_test;
mod no_proxy_pattern_test;
mod package_sorter_test;