#!/usr/bin/env perl
##**************************************************************
##
## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
## University of Wisconsin-Madison, WI.
## 
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this file except in compliance with the License.  You may
## obtain a copy of the License at
## 
##    http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
##**************************************************************


$i = 0;

$config_val = "./condor_config_val.pc";
#$config_val = "./condor_config_val";

run( "$config_val" );
run( "$config_val -pool condor -n" );
run( "$config_val -pool" ); 
run( "$config_val -pool -n perdita" );
run( "$config_val -pool basda" );
run( "$config_val -pool condor -n bazsa log" );
run( "$config_val -pool condor -n chevre" );
run( "$config_val -pool condor -n chevre hostname" );   
run( "$config_val -pool condor -n chevre log" );   
run( "$config_val -pool condor -n chevre -schedd subsystem" );
run( "$config_val -pool condor -n chevre -collector subsystem" );
run( "$config_val -pool condor -n chevre -master subsystem" );
run( "$config_val -pool condor -n chevre -startd subsystem" );
run( "$config_val -pool condor -n chevre -negotiator subsystem" );
run( "$config_val -pool condor -n perdita -negotiator subsystem" );
run( "$config_val -pool condor -n family.hampshire.edu log" );
run( "$config_val -a '<128.105.73.32:23525>'" );
run( "$config_val -a '<128.105.73.32:23525>' log" );
run( "$config_val -a '<128.105.73.32>' log" );
run( "$config_val -a" );
run( "$config_val -h perdita" );
run( "$config_val -h" );
run( "$config_val -h chevre log" );
run( "$config_val -owner" );
run( "$config_val -tilde" );
run( "$config_val -foo" );

sub run {
    my( $foo ) = $_[0];
    my( $file ) = "config_val.test.out.$i";
    my( $output );
    print "Working on: $foo\n";
    open( OUT, ">$file" ) || die "Can't open $file: $!\n";
    print OUT "$foo\n";
    $output = `$foo 2> /dev/null`;
    print OUT "$output\n";
    $i++;
}






