Skip to content

Commit

Permalink
Item11945: missing form types are now logged
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@14995 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 16, 2012
1 parent 919d617 commit ef63734
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions UnitTestContrib/test/unit/HTMLValidationTests.pm
Expand Up @@ -203,8 +203,16 @@ sub call_UI_FN {
$this->assert_matches( qr/^1?$/, $result,
"$SCRIPT_NAME returned '$result'" )
if defined $result;
$this->assert_equals( '', $stderr, "$SCRIPT_NAME errored: '$stderr'" )
if defined $stderr;

# Item11945: Foswiki now logs when bad or missing form types are used, so
# check STDERR is only a single line & that it contains that warning
$this->assert(
(
!$stderr || ( scalar( $stderr =~ /([\r\n]+)/g ) == 1
&& $stderr =~ /error compiling class Foswiki::Form::Nuffin/ )
),
"$SCRIPT_NAME errored: '$stderr'"
) if defined $stderr;

# Remove CGI header
my $CRLF = "\015\012"; # "\r\n" is not portable
Expand Down

0 comments on commit ef63734

Please sign in to comment.