gruntjs/grunt — pull request #713 by vanetix (2013-03-07 20:32:49+00:00)
Title: Prevent unexpected error from calling log.wraptext on undefined

Previously internal calls to `grunt.log.wraptext(77, undefined)` would throw and uncaught error. This was due to the `text.match` call. Now, if `grunt.log.wraptext` is called with `undefined` or a string of `length === 0`, `''` is returned. This also make calls to `grunt.log.oklns()` print the expected `OK` status text.

Added a check to ensure text is *something* significant (ie: not of length 0 or undefined), included a test for this functionality.