Thanks to visit codestin.com
Credit goes to github.com

Skip to content

use_test() creates wrong file if period in file name #1690

@moodymudskipper

Description

@moodymudskipper

I'm on a "data.frame.R" tab, it will create a "test-data.R", I expect a "test-data.frame.R" tab.

It's due to slug(), due in turn to fs::path_ext_set() but I think for the latter it's the intended behaviour.

usethis:::slug("data.frame.R", "R")
#> [1] "data.R"

fs::path_ext_set("data.frame", "R")
#> data.R

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorcode 🖥️R/, tests/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions