From 80a4f5ebaf3390fc91063425029a0c17bc2b6e40 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Fri, 17 Jul 2026 23:42:51 -0700 Subject: [PATCH] [swift-scheduling] Sync new test from the problem specs --- exercises/practice/swift-scheduling/.meta/tests.toml | 3 +++ .../practice/swift-scheduling/swift_scheduling.bats | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/exercises/practice/swift-scheduling/.meta/tests.toml b/exercises/practice/swift-scheduling/.meta/tests.toml index 7cc3e415..f2475c9e 100644 --- a/exercises/practice/swift-scheduling/.meta/tests.toml +++ b/exercises/practice/swift-scheduling/.meta/tests.toml @@ -56,3 +56,6 @@ description = "Q4 in the second quarter translates to the last workday of the fo [c920886c-44ad-4d34-a156-dc4176186581] description = "Q3 in the fourth quarter translates to the last workday of the third quarter of next year" + +[7c8f1616-be62-417e-bbd5-a60fa743eccc] +description = "Q2 starting in the last month of the second quarter translates to the last workday of the second quarter of this year" diff --git a/exercises/practice/swift-scheduling/swift_scheduling.bats b/exercises/practice/swift-scheduling/swift_scheduling.bats index 68af762b..e55f9648 100644 --- a/exercises/practice/swift-scheduling/swift_scheduling.bats +++ b/exercises/practice/swift-scheduling/swift_scheduling.bats @@ -1,7 +1,7 @@ #!/usr/bin/env bats load bats-extra -# generated on 2026-06-29T16:53:25+00:00 +# generated on 2026-07-18T06:41:40+00:00 @test "NOW translates to two hours later" { # [[ $BATS_RUN_SKIPPED == "true" ]] || skip @@ -114,3 +114,11 @@ load bats-extra assert_success assert_output "2023-09-29T08:00:00" } + +@test "Q2 starting in the last month of the second quarter translates to the last workday of the second quarter of this year" { + [[ $BATS_RUN_SKIPPED == "true" ]] || skip + run bash swift_scheduling.sh "Q2" "2019-06-15T09:50:00" + assert_success + assert_output "2019-06-28T08:00:00" +} +