summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-12-06 00:02:37 +0000
committerhinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-12-06 00:02:37 +0000
commit09ebaa25d4c4318a4e7d0b4d8b248203202c7b48 (patch)
treea67d035092307ae31dcbafbf30282228b32e8fdd /lib
parente491a4a17beabad644d7b8f596ef23cb5ef0f4c1 (diff)
Ignore comments in test output files
Previously the content of comment lines was ignored. This commit causes comment lines to be ignored completely, allowing differing numbers of them to compare as "the same". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4773 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/RunTestUtils.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/sbin/RunTestUtils.pl b/lib/sbin/RunTestUtils.pl
index 92c37d99..b85e83f4 100644
--- a/lib/sbin/RunTestUtils.pl
+++ b/lib/sbin/RunTestUtils.pl
@@ -1107,10 +1107,15 @@ sub CompareTestFiles
while ($oline = <INORIG>)
{
- $nline = <INNEW>;
+ # ignore comment lines in old file
+ next if ($oline =~ /^\s*["\#]/);
- # ignore comment lines
- next if (($oline =~ /^\s*["\#]/) && ($nline =~ /^\s*["\#]/));
+ # ignore comment lines in new file
+ do
+ {
+ $nline = <INNEW>;
+ }
+ while ($nline =~ /^\s*["\#]/);
# Now lets see if they differ.
$numlines++;