-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
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 one of them stuck out as plain wrong code.
thread 'features::tty::tests::test_terminal_type_display' panicked at src/lib/features/tty.rs:122:9:
assertion `left == right` failed
left: "/dev/ttyS10"
right: "/dev/pts/10"
The code looks like
impl Display for Teletype {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Self::Tty(id) => write!(f, "/dev/pts/{}", id),
Self::TtyS(id) => write!(f, "/dev/tty{}", id),
Self::Pts(id) => write!(f, "/dev/ttyS{}", id),
Self::Unknown => write!(f, "?"),
}
}
}
Which just looks plain wrong. I don't see how this test can ever have passed.
Metadata
Metadata
Assignees
Labels
No labels