adapt to 'test' command behavior of Linux