puppetlabs/puppet — pull request #2014 by samyboy (2013-10-28 10:28:12+00:00)
Title: [#22992] Correction of wrong exit code when testing state.yaml

Related issue: http://projects.puppetlabs.com/issues/22992

I think the previous version mishandled the "case" expression ( `case @proc or @file` ): `@proc` had precedence and always enters the first case. Because of this `@file` was never evaluated.

The proposed patch handles status priorities (CRITICAL is more important than UNKNOWN) and removes a typo that existed since the begininng.