Skip to content

uucore - test_tty_from fails. #7733

@plugwash

Description

@plugwash

We recently updated the uucore crate in Debian, and I was looking through the test failures. Most of them seem related to our test environment, but this one did not seem in any way environment specific.

thread 'features::tty::tests::test_tty_from' panicked at src/lib/features/tty.rs:101:44:
called `Result::unwrap()` on an `Err` value: ()

assert_eq!(Teletype::try_from("?").unwrap(), Teletype::Unknown);

When I look at the code for Teletype::try_from, I see that the impl for "String" has a special case for "?" but the impl for "&str" has no such special case. Such an inconsistency seems wrong, and this also suggests that noone ever actually ran the tests in question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions