diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 00:51:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 00:51:40 +0900 |
| commit | 53f027302ebcb91f6fb9b177f5e7e9e2d00c5089 (patch) | |
| tree | 8e5253105ca5abea99208cc47caae3fb118f734a /crates/shirabe/tests/platform | |
| parent | 7bea9042a79d3cbfe31cc2595e8b8c6a3788ba15 (diff) | |
| download | php-shirabe-53f027302ebcb91f6fb9b177f5e7e9e2d00c5089.tar.gz php-shirabe-53f027302ebcb91f6fb9b177f5e7e9e2d00c5089.tar.zst php-shirabe-53f027302ebcb91f6fb9b177f5e7e9e2d00c5089.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/platform')
| -rw-r--r-- | crates/shirabe/tests/platform/main.rs | 1 | ||||
| -rw-r--r-- | crates/shirabe/tests/platform/runtime_test.rs | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/crates/shirabe/tests/platform/main.rs b/crates/shirabe/tests/platform/main.rs new file mode 100644 index 0000000..a43e54a --- /dev/null +++ b/crates/shirabe/tests/platform/main.rs @@ -0,0 +1 @@ +mod runtime_test; 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' + "<h2><a name=\"module_pdo_sqlite\" href=\"#module_pdo_sqlite\">pdo_sqlite</a></h2> +<table> +<tr><td class=\"e\">PDO Driver for SQLite 3.x </td><td class=\"v\">enabled </td></tr> +<tr><td class=\"e\">SQLite Library </td><td class=\"v\">3.40.1 </td></tr> +</table>", + "pdo_sqlite + +PDO Driver for SQLite 3.x => enabled +SQLite Library => 3.40.1", + )] +} |
