Subject: | 'Fileevent callback should never be called' t/fileevent2.t test fails if stdin is not a tty |
t/fileevent2.t is fails if standard input is not a TTY:
$ xvfb-run -a prove -b t/fileevent2.t
t/fileevent2.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.11 cusr 0.05 csys = 0.22 CPU)
Result: PASS
$ xvfb-run -a prove -b t/fileevent2.t </dev/null
t/fileevent2.t .. 1/1
# Failed test 'Fileevent callback should never be called'
# at t/fileevent2.t line 50.
# got: '109300'
# expected: '0'
This is especially true for automated headless test, e.g. when building the software.
The reported number looks like a count of callback invocation the system manages in 300 time units ($mw->after(300,...)). The callback is invoked because the file reached end of file.