From 3354e2dce7e805a864fd04c9261a9445c2b9b236 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 11 Feb 2008 19:47:53 +0000 Subject: [PATCH] Do not fail if the expected user is not present in the file, give an useful warning. --- tests/common/compare_file.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common/compare_file.pl b/tests/common/compare_file.pl index f64be01c..a4e07661 100755 --- a/tests/common/compare_file.pl +++ b/tests/common/compare_file.pl @@ -22,6 +22,9 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_DES ([^:]*)\@:(.*)$/s) { die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" if ($checkpass ne $cryptpass); + } else { + die "No user '$user' in ".$ARGV[1].".\n"; + } } $tmp = $template; @@ -40,6 +43,9 @@ while ($tmp =~ m/^(.*?)([^\n]*):\@PASS_MD5 (.*)\@:(.*)$/s) { die "Wrong password: '$cryptpass'. Expected password: '$checkpass'\n" if ($checkpass ne $cryptpass); + } else { + die "No user '$user' in ".$ARGV[1].".\n"; + } }