Update of /cvsroot/lxr/lxr/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10802/lxr/tests
Modified Files:
ConfigTest.pm
Log Message:
Fix for [ 1277254 ] --url option needs better help
Produce better error messages if we can't find a configuration.
Index: ConfigTest.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/tests/ConfigTest.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ConfigTest.pm 6 Sep 2004 21:54:45 -0000 1.2
+++ ConfigTest.pm 10 Sep 2005 00:09:20 -0000 1.3
@@ -52,6 +52,15 @@
$self->assert($#vars == 1, "Too many variables returned got " . $self->{config}->allvariables());
}
+sub test_config_error {
+ my $self = shift;
+ my $t;
+
+ eval {new LXR::Config("/a/path", "./lxr.conf")};
+ $t = $@;
+ $self->assert(defined($t), "Didn't fail to find config");
+ $self->assert_matches(qr/--url parameter should be a URL \(e\.g\. http:/, $t);
+}
# set_up and tear_down are used to
# prepare and release resources need for testing
|