]> err.no Git - varnish/commitdiff
If the first and only argument is 'list', list all available test cases.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 09:42:01 +0000 (09:42 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 20 Aug 2007 09:42:01 +0000 (09:42 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1876 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-tools/regress/varnish-regress.pl

index 5a27cfdb2b84c3e5f394170808b7691c038acf68..3d2105b6bfd80455004206097d37022848be2fa8 100755 (executable)
@@ -62,9 +62,15 @@ MAIN:{
        or usage();
 
     my $controller = new Varnish::Test;
+    my @all_cases = $controller->cases();
+
+    if (@ARGV == 1 && $ARGV[0] eq 'list') {
+       print join(' ', @all_cases), "\n";
+       exit 0;
+    }
 
     if (!@ARGV) {
-       @ARGV = $controller->cases();
+       @ARGV = @all_cases;
     } else {
        map { s/^(\d+)$/sprintf('Ticket%03d', $1)/e } @ARGV;
     }