aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests
AgeCommit message (Collapse)Author
2026-06-21test(util): port TarTestnsfisis
All cases reuse the existing PHP fixtures under composer/tests/Composer/Test/Util/Fixtures/Tar. Marked #[ignore] because PharData::new is todo!() in the php-shim. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test(package): port VersionParserTestnsfisis
Both testParseNameVersionPairs (lookbehind/lookahead pattern unsupported by the regex crate) and testIsUpgrade (reaches a todo!() in the php-shim) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port ForgejoUrl, Silencer, PlatformRequirementFilterFactory testsnsfisis
Factory's instance-creation tests pass. ForgejoUrl (undelimited regex panic), Silencer (trigger_error/microtime todo!()), and the factory's unknown-type case (get_debug_type todo!()) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port BufferIO, Runtime, JsonValidationException testsnsfisis
JsonValidationExceptionTest passes. BufferIOTest (set_user_inputs is todo!()) and RuntimeTest (html_entity_decode is todo!()) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: port small leaf tests (config, filters, platform, formatter)nsfisis
Port DefaultConfigTest, IgnoreAll/IgnoreNothingPlatformRequirementFilterTest, PlatformTest, GitExcludeFilterTest, and HtmlOutputFormatterTest. Each PHP Test/<Subdir>/ maps to a single integration-test binary via tests/<dir>/main.rs (the target is named after the directory) whose #[test] functions are collected from the module tree. Tests that exercise unported library behavior (regex backreferences, Preg::split, env expansion) are marked #[ignore]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21test: add empty test filesnsfisis
2026-06-20test(cli): un-ignore no-longer-panicking command testsnsfisis
run-script, search, show, and update no longer panic; they exit with argument errors, which run_no_panic treats as success. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(outdated): proxy execute to show via shared Applicationnsfisis
The execute() proxy was left as todo!(); wire it to the shared Application handle so `outdated` re-enters the run flow as `show -l`, matching PHP's $this->getApplication()->run(). Add Application::shared() to expose the new_shared self-reference and un-ignore run_outdated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(finder): implement Finder traversal and filter pipelinensfisis
Replace the todo!() stubs with an inline port of symfony/finder's searchInDirectory() pipeline, materializing entries as PathBuf in place of SplFileInfo. Also port Glob::toRegex, needed for glob name patterns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(console): implement doRenderThrowable exception renderingnsfisis
Port Symfony's Application::doRenderThrowable so command failures render the error box instead of hitting todo!(). This unblocks six CLI no-panic tests (config, depends, global, prohibits, remove, repository), whose ignore attributes are now removed. Also fill in the php-shim functions on the render path that were still todo!(): php_exception_get_code, intval, str_pad, str_split, mb_detect_encoding, mb_convert_encoding, mb_strwidth, mb_convert_variables. PHP file/line and the verbose getTrace() block have no faithful Rust equivalent; file/line use PHP's own 'n/a' fallback and the trace block is intentionally omitted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20refactor(console): propagate getComposer's exit(1) as ExitExceptionnsfisis
Composer's Application::getComposer() calls exit(1) when a required Composer instance fails to build under areExceptionsCaught(). Replace the deep std::process::exit with a php-shim ExitException that mirrors PHP's `exit` construct: it bypasses parent::doRun()'s catch and Symfony's renderThrowable (excluded at both broad catches), so the already-written plain error message is not re-rendered and the process exits with code 1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20feat(php-shim): implement dirname()nsfisis
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20fix(global-command): call base_run to stop run() infinite recursionnsfisis
GlobalCommand::run fell back to self.run when given fewer than two args, recursing forever and overflowing the stack. PHP calls parent::run there. Add Command::base_run holding the base run body so the override can delegate to it, matching PHP's parent::run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20test(cli): add more smoke testsnsfisis
2026-06-19test(command): add basic smoke testsnsfisis