diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-22 19:47:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-22 19:47:32 +0900 |
| commit | dbb33ad61d35d12cc30eb2c79a7b7f557bb147a5 (patch) | |
| tree | e7ab2e231f3c8b61447c9cacfdfcfb55c078dfe2 /crates/shirabe/tests/command | |
| parent | 3ef7095aa0c8cdb6c1f15d46304bbe8c2e6393d6 (diff) | |
| download | php-shirabe-dbb33ad61d35d12cc30eb2c79a7b7f557bb147a5.tar.gz php-shirabe-dbb33ad61d35d12cc30eb2c79a7b7f557bb147a5.tar.zst php-shirabe-dbb33ad61d35d12cc30eb2c79a7b7f557bb147a5.zip | |
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.
Diffstat (limited to 'crates/shirabe/tests/command')
| -rw-r--r-- | crates/shirabe/tests/command/show_command_test.rs | 10 |
1 files 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 <highlight>! 1.0.1</highlight>", #[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( |
