From dbb33ad61d35d12cc30eb2c79a7b7f557bb147a5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 22 Aug 2026 19:47:32 +0900 Subject: test(show-command): run test_self again date() renders in the system default timezone, so the mismatch the ignore described is gone; the test passes with the local date ahead of or behind the UTC date. test_show_outdated_deps_sorting_by_age still fails that way, because ShowCommand::get_relative_time formats the release date in UTC while taking "today" from date(). Its ignore now says so on its own. --- crates/shirabe/tests/command/show_command_test.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/shirabe/tests/command/show_command_test.rs b/crates/shirabe/tests/command/show_command_test.rs index 8cb124fd..0bab12e1 100644 --- a/crates/shirabe/tests/command/show_command_test.rs +++ b/crates/shirabe/tests/command/show_command_test.rs @@ -193,7 +193,11 @@ outdated/patch 1.0.0 ! 1.0.1", #[test] #[serial] -#[ignore = "see test_self()"] +// TODO(php-semantics): ShowCommand::get_relative_time formats the release date in UTC but takes +// "today" from date(), which renders in the system default timezone, so a release date set to the +// current instant is not recognised as today whenever the two dates differ. +#[ignore = "get_relative_time renders \"from this week\" instead of \"from today\" for the \ + just-released outdated/major whenever the local date differs from the UTC date"] fn test_show_outdated_deps_sorting_by_age() { run_show_case( input(vec![ @@ -1030,10 +1034,6 @@ fn test_self_and_package_combination() { #[test] #[serial] -#[ignore = "the shim date() renders in UTC only (no timezone database) while PHP's date() uses \ - the system default timezone, so ShowCommand::get_relative_time misses the \"today\" \ - match and prints \"this week\" whenever the local date differs from the UTC date \ - (e.g. daily 00:00-09:00 JST); see TODO(php-semantics) in shirabe-php-shim datetime.rs"] fn test_self() { let today = date_local("Y-m-d", None); let _tear_down = init_temp_composer( -- cgit v1.3.1-4-g156e