Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Feb 2, 2024
1 parent a2c7d5c commit 175d884
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions exp/term/termios/termios_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ func TestTermios(t *testing.T) {
if v := term.Cc[allCcOpts[ERASE]]; v != 1 {
t.Errorf("Cc.ERROR should be 1, was %d", v)
}
if v := term.Iflag & allInputOpts[IGNCR]; v == 0 {
if v := term.Iflag & bit(allInputOpts[IGNCR]); v == 0 {
t.Errorf("I.IGNCR should be true, was %d", v)
}
if v := term.Iflag & allInputOpts[IXOFF]; v != 0 {
if v := term.Iflag & bit(allInputOpts[IXOFF]); v != 0 {
t.Errorf("I.IGNCR should be false, was %d", v)
}
if v := term.Oflag & allOutputOpts[OCRNL]; v == 0 {
if v := term.Oflag & bit(allOutputOpts[OCRNL]); v == 0 {
t.Errorf("O.OCRNL should be true, was %d", v)
}
if v := term.Oflag & allOutputOpts[ONLCR]; v != 0 {
if v := term.Oflag & bit(allOutputOpts[ONLCR]); v != 0 {
t.Errorf("O.ONLCR should be false, was %d", v)
}
if v := term.Cflag & allControlOpts[CS7]; v == 0 {
if v := term.Cflag & bit(allControlOpts[CS7]); v == 0 {
t.Errorf("C.CS7 should be true, was %d", v)
}
if v := term.Cflag & allControlOpts[PARODD]; v != 0 {
if v := term.Cflag & bit(allControlOpts[PARODD]); v != 0 {
t.Errorf("C.PARODD should be false, was %d", v)
}
if v := term.Lflag & allLineOpts[ECHO]; v == 0 {
if v := term.Lflag & bit(allLineOpts[ECHO]); v == 0 {
t.Errorf("L.ECHO should be true, was %d", v)
}
if v := term.Lflag & allLineOpts[ECHOE]; v != 0 {
if v := term.Lflag & bit(allLineOpts[ECHOE]); v != 0 {
t.Errorf("L.ECHOE should be false, was %d", v)
}
}

0 comments on commit 175d884

Please sign in to comment.