From 53f027302ebcb91f6fb9b177f5e7e9e2d00c5089 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 00:51:40 +0900 Subject: test: port BufferIO, Runtime, JsonValidationException tests 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) --- crates/shirabe/tests/platform/runtime_test.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'crates/shirabe/tests/platform/runtime_test.rs') diff --git a/crates/shirabe/tests/platform/runtime_test.rs b/crates/shirabe/tests/platform/runtime_test.rs index 1fbb628..a655c95 100644 --- a/crates/shirabe/tests/platform/runtime_test.rs +++ b/crates/shirabe/tests/platform/runtime_test.rs @@ -1 +1,26 @@ //! ref: composer/tests/Composer/Test/Platform/RuntimeTest.php + +use shirabe::platform::runtime::Runtime; + +#[test] +#[ignore = "Runtime::parse_html_extension_info reaches a todo!() in the php-shim (html_entity_decode)"] +fn test_parse_extension_info() { + for (html_input, expected_output) in provide_extension_infos() { + assert_eq!(expected_output, Runtime::parse_html_extension_info(html_input)); + } +} + +fn provide_extension_infos() -> Vec<(&'static str, &'static str)> { + vec![( + // 'pdo_sqlite' + "

pdo_sqlite

+ + + +
PDO Driver for SQLite 3.x enabled
SQLite Library 3.40.1
", + "pdo_sqlite + +PDO Driver for SQLite 3.x => enabled +SQLite Library => 3.40.1", + )] +} -- cgit v1.3.1