Skip to content

Commit cb26ebb

Browse files
authored
Teach pluralize about box, fox (#2104)
1 parent 6f932cc commit cb26ebb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/PrintHelper.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ function pluralize(noun::String)
2626
# vertex -> vertices
2727
endswith(noun, "ex") && return noun[1:end-2] * "ices"
2828

29+
# box -> boxes
30+
endswith(noun, "ox") && return noun[1:end-2] * "oxes"
31+
2932
# polyhedron -> polyhedra
3033
endswith(noun, "ron") && return noun[1:end-2] * "a"
3134

test/PrintHelper-test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@testset "pluralize" begin
22
@test pluralize("basis") == "bases"
3+
@test pluralize("box") == "boxes"
34
@test pluralize("child") == "children"
45
@test pluralize("generator") == "generators"
56
@test pluralize("indeterminate") == "indeterminates"

0 commit comments

Comments
 (0)