From 09ebaa25d4c4318a4e7d0b4d8b248203202c7b48 Mon Sep 17 00:00:00 2001 From: hinder Date: Tue, 6 Dec 2011 00:02:37 +0000 Subject: 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 --- lib/sbin/RunTestUtils.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/sbin') 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 = ) { - $nline = ; + # 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 = ; + } + while ($nline =~ /^\s*["\#]/); # Now lets see if they differ. $numlines++; -- cgit v1.2.3