Skip to content

Commit

Permalink
Add test with expanded without middle name
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Dec 12, 2024
1 parent 35af260 commit f304b5c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-expand_names.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
test_that("expand_names() transforms matching names", {

# Expanded without middle name
expect_identical(
expand_names(
c("W Mozart", "Wolfgang Mozart"),
"Wolfgang Mozart"
),
rep_len("Wolfgang Mozart", 2)
)

# Expanded ith middle name
expect_identical(
expand_names(
c("W A Mozart", "Wolfgang Mozart", "Wolfgang A Mozart"),
Expand Down

0 comments on commit f304b5c

Please sign in to comment.