Skip to content

Filenames with plus signs #11

@koivunej

Description

@koivunej

Expected: example filenames with + to work.

Actual: test_generator::test_resources panicked with message: "some_fn_name" is not a valid identifier

Looks like the issue is at

// Form canonical name without any punctuation/delimiter or special character
fn canonical_fn_name(s: &str) -> String {
// remove delimiters and special characters
s.replace(
&['"', ' ', '.', ':', '-', '*', '/', '\\', '\n', '\t', '\r'][..],
"_",
)
}
but I am not really sure what would be the exhaustive list of characters needing to be translated to _. Might be that there are so many caveats that #5 is the way to go when defaults fail to work? Though in this case I'd just re-create the name mangling with this additional character, so not sure how good overall solution that'd be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions