diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-03 01:30:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-03 01:30:13 +0900 |
| commit | bf7ec47524a068c7fa7658f03f4dd44957f492a6 (patch) | |
| tree | 4613221f9df01865f01dbb52fd9dc02cab009bab /crates/shirabe | |
| parent | 2f28d8112970960dbb9b6b582a3c6cd259337d21 (diff) | |
| download | php-shirabe-bf7ec47524a068c7fa7658f03f4dd44957f492a6.tar.gz php-shirabe-bf7ec47524a068c7fa7658f03f4dd44957f492a6.tar.zst php-shirabe-bf7ec47524a068c7fa7658f03f4dd44957f492a6.zip | |
test(json): serialize the tests sharing the tabs2.json scratch file
test_preserve_indentation_after_read and test_overwrites_indentation_by_default
copy to and delete the same fixture path; PHPUnit runs them serially, the
parallel Rust harness let them race and flake.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe')
| -rw-r--r-- | crates/shirabe/tests/json/json_file_test.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/shirabe/tests/json/json_file_test.rs b/crates/shirabe/tests/json/json_file_test.rs index 785b4721..49ac1605 100644 --- a/crates/shirabe/tests/json/json_file_test.rs +++ b/crates/shirabe/tests/json/json_file_test.rs @@ -203,7 +203,10 @@ fn test_double_escaped_unicode() { assert_eq!(data, double_data); } +// Shares the tabs2.json scratch file with test_overwrites_indentation_by_default; PHPUnit runs +// tests serially, so the two never collide upstream. #[test] +#[serial_test::serial(tabs2_fixture)] fn test_preserve_indentation_after_read() { let src = fixture_path("tabs.json"); let dst = fixture_path("tabs2.json"); @@ -223,7 +226,9 @@ fn test_preserve_indentation_after_read() { std::fs::remove_file(&dst).unwrap(); } +// See test_preserve_indentation_after_read. #[test] +#[serial_test::serial(tabs2_fixture)] fn test_overwrites_indentation_by_default() { let src = fixture_path("tabs.json"); let dst = fixture_path("tabs2.json"); |
