From dc0087845355222d1cbf2820289444db3eebc87e Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Jul 2026 18:19:24 +0900 Subject: fix(json-file): forward detected indent into write's encode options JsonFile::write_with_options() used the caller-supplied JsonEncodeOptions verbatim, ignoring self.indent (set by read()'s detect_indenting), unlike PHP's write() which always passes $this->indent to encode() regardless of the $options argument. Un-ignore test_preserve_indentation_after_read. --- crates/shirabe/tests/json/json_file_test.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/shirabe/tests/json/json_file_test.rs') diff --git a/crates/shirabe/tests/json/json_file_test.rs b/crates/shirabe/tests/json/json_file_test.rs index bc0fe223..14cb1e68 100644 --- a/crates/shirabe/tests/json/json_file_test.rs +++ b/crates/shirabe/tests/json/json_file_test.rs @@ -204,7 +204,6 @@ fn test_double_escaped_unicode() { } #[test] -#[ignore = "JsonFile::write never forwards self.indent (set by read()'s detect_indenting) into the encode options, unlike PHP's write() which passes $this->indent to encode()"] fn test_preserve_indentation_after_read() { let src = fixture_path("tabs.json"); let dst = fixture_path("tabs2.json"); -- cgit v1.3.1