diff options
author | hinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2011-12-06 00:02:37 +0000 |
---|---|---|
committer | hinder <hinder@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2011-12-06 00:02:37 +0000 |
commit | 09ebaa25d4c4318a4e7d0b4d8b248203202c7b48 (patch) | |
tree | a67d035092307ae31dcbafbf30282228b32e8fdd /lib/sbin | |
parent | e491a4a17beabad644d7b8f596ef23cb5ef0f4c1 (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/sbin')
-rw-r--r-- | lib/sbin/RunTestUtils.pl | 11 |
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++; |