lib/warnings.t should actually run the test in t/lib/warnings/doop
authorNicholas Clark <nick@ccl4.org>
Mon, 15 Jul 2013 07:48:02 +0000 (09:48 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 22 Jul 2013 08:04:47 +0000 (10:04 +0200)
commitf9b950a22dcff51aab6668aa7e5d67e5d8566495
tree4c297dae311c132972da3c7423024ed729939690
parent977193dd5da782ebbd7faad9466da2a28ea053f4
lib/warnings.t should actually run the test in t/lib/warnings/doop

The file containing a single test for a warning in doop.c was added by
commit 0453d815b8a74697 in June 1999. However, as the file does not contain
an __END__ marker, the parser skips the entire contents of the file looking
for the __END__, and then assumes that the file contains no tests. This has
been true since the parser code was first implemented (in t/pragma/warning.t)
in commit 8ebc5c0145d2e355 in Jan 1997.

The simplest fix is to add an __END__ to the start of t/lib/warnings/doop
Also add some sanity checking to ensure that this doesn't happen again.
t/lib/common.pl
t/lib/warnings/doop