Skip to content

Commit 11b031d

Browse files
authored
Add new tests to two-bucket (#329)
closes #328
1 parent da57f96 commit 11b031d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

exercises/practice/two-bucket/.meta/tests.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ description = "Measure one step using bucket one of size 1 and bucket two of siz
2727
[eb329c63-5540-4735-b30b-97f7f4df0f84]
2828
description = "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two"
2929

30+
[58d70152-bf2b-46bb-ad54-be58ebe94c03]
31+
description = "Measure using bucket one much bigger than bucket two"
32+
33+
[9dbe6499-caa5-4a58-b5ce-c988d71b8981]
34+
description = "Measure using bucket one much smaller than bucket two"
35+
3036
[449be72d-b10a-4f4b-a959-ca741e333b72]
3137
description = "Not possible to reach the goal"
3238

exercises/practice/two-bucket/test-two-bucket.bats

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ load bats-extra
4646
assert_output '2,two,2'
4747
}
4848

49+
@test "Measure using bucket one much bigger than bucket two" {
50+
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
51+
run gawk -f two-bucket.awk <<< '5,1,2,one'
52+
assert_success
53+
assert_output '6,one,1'
54+
}
55+
56+
@test "Measure using bucket one much smaller than bucket two" {
57+
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
58+
run gawk -f two-bucket.awk <<< '3,15,9,one'
59+
assert_success
60+
assert_output '6,two,0'
61+
}
62+
4963
@test "Not possible to reach the goal" {
5064
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
5165
run gawk -f two-bucket.awk <<< '6,15,5,one'

0 commit comments

Comments
 (0)