fix display test logic

The display logic is Windows specific, so test its functionality
on Windows, and its non-functionality on non-Windows.