From 3a0d9340810a8808d963135a884f50d08442ac67 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 25 Jun 2026 16:27:53 +0900 Subject: test: port 59 autoload/vcs/installer/util/command tests; fix output capture Port autoload_generator (24), bitbucket (14), suggested_packages (11), git_driver (6), archive_manager (3), and a bump command test. Fix the ApplicationTester output-capture root cause (php://memory streams must be readable regardless of fopen mode). Implement posix_getuid/geteuid, the PCRE 'A' anchored modifier, php_strip_whitespace, stream_get_wrappers, is_callable scalars; fix preg_quote angle-bracket escaping and class-map parser regexes. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/package/handle.rs | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'crates/shirabe/src/package') diff --git a/crates/shirabe/src/package/handle.rs b/crates/shirabe/src/package/handle.rs index 9405692..7ef7e98 100644 --- a/crates/shirabe/src/package/handle.rs +++ b/crates/shirabe/src/package/handle.rs @@ -1205,6 +1205,15 @@ macro_rules! impl_real_package_test_setters { .set_extra(extra); } + /// For testing only: mirrors PHP `Package::setSuggests`. + pub fn __set_suggests(&self, suggests: indexmap::IndexMap) { + self.0 + .borrow_mut() + .as_package_mut() + .expect("real package handle invariant") + .set_suggests(suggests); + } + /// For testing only: mirrors PHP `Package::setType`. pub fn __set_type(&self, r#type: String) { self.0 @@ -1240,6 +1249,39 @@ macro_rules! impl_real_package_test_setters { .expect("real package handle invariant") .set_target_dir(target_dir); } + + /// For testing only: mirrors PHP `Package::setAutoload`. + pub fn __set_autoload( + &self, + autoload: indexmap::IndexMap, + ) { + self.0 + .borrow_mut() + .as_package_mut() + .expect("real package handle invariant") + .set_autoload(autoload); + } + + /// For testing only: mirrors PHP `Package::setDevAutoload`. + pub fn __set_dev_autoload( + &self, + dev_autoload: indexmap::IndexMap, + ) { + self.0 + .borrow_mut() + .as_package_mut() + .expect("real package handle invariant") + .set_dev_autoload(dev_autoload); + } + + /// For testing only: mirrors PHP `Package::setIncludePaths`. + pub fn __set_include_paths(&self, include_paths: Vec) { + self.0 + .borrow_mut() + .as_package_mut() + .expect("real package handle invariant") + .set_include_paths(include_paths); + } } }; } -- cgit v1.3.1