test: Test exit code in `run`.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>