To clarify a misconception, the pregnancy test was not running Doom. The guy who did it connected the test's display to an external device which was actually running the game, it was just displayed on the pregnancy test's screen.
The device was not running the game either, just a video of it - but people have connected this (very standard) display to Raspberry Pis and even any Linux machine over HDMI.