1cdf0e10cSrcweir#!/usr/local/bin/perl
2cdf0e10cSrcweir#########################################################################
3cdf0e10cSrcweir
4*7e90fac2SAndrew Rist #**************************************************************
5*7e90fac2SAndrew Rist#
6*7e90fac2SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
7*7e90fac2SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
8*7e90fac2SAndrew Rist#  distributed with this work for additional information
9*7e90fac2SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
10*7e90fac2SAndrew Rist#  to you under the Apache License, Version 2.0 (the
11*7e90fac2SAndrew Rist#  "License"); you may not use this file except in compliance
12*7e90fac2SAndrew Rist#  with the License.  You may obtain a copy of the License at
13*7e90fac2SAndrew Rist#
14*7e90fac2SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
15*7e90fac2SAndrew Rist#
16*7e90fac2SAndrew Rist#  Unless required by applicable law or agreed to in writing,
17*7e90fac2SAndrew Rist#  software distributed under the License is distributed on an
18*7e90fac2SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19*7e90fac2SAndrew Rist#  KIND, either express or implied.  See the License for the
20*7e90fac2SAndrew Rist#  specific language governing permissions and limitations
21*7e90fac2SAndrew Rist#  under the License.
22*7e90fac2SAndrew Rist#
23*7e90fac2SAndrew Rist#**************************************************************
24*7e90fac2SAndrew Rist
25*7e90fac2SAndrew Rist
26cdf0e10cSrcweir
27cdf0e10cSrcweiropen(TESTFILE, $ARGV[0]);
28cdf0e10cSrcweir
29cdf0e10cSrcweirwhile (<TESTFILE>)
30cdf0e10cSrcweir{
31cdf0e10cSrcweir    if ($_[1] eq "-q")
32cdf0e10cSrcweir    {
33cdf0e10cSrcweir	chomp $_;
34cdf0e10cSrcweir	@args = split('\|', $_);
35cdf0e10cSrcweir	@filestuff = split('\.', @args[0]);
36cdf0e10cSrcweir	$filename = @filestuff[0] . ".infile";
37cdf0e10cSrcweir	open (TESTCASE, ">$filename") || die "Error opening $filename";
38cdf0e10cSrcweir	print TESTCASE "# @args[1]\n# @args[2]\n";
39cdf0e10cSrcweir	print TESTCASE "TEST|@args[1]|QUICKWORD|@filestuff[0]\n" ;
40cdf0e10cSrcweir	close TESTCASE;
41cdf0e10cSrcweir    }
42cdf0e10cSrcweir    if ($_[1] eq "-m")
43cdf0e10cSrcweir    {
44cdf0e10cSrcweir	chomp $_;
45cdf0e10cSrcweir	@args = split('\|', $_);
46cdf0e10cSrcweir	@filestuff = split('\.', @args[0]);
47cdf0e10cSrcweir	$filename = @filestuff[0] . ".infile";
48cdf0e10cSrcweir	open (TESTCASE, ">$filename") || die "Error opening $filename";
49cdf0e10cSrcweir	print TESTCASE "# @args[1]\n# @args[2]\n";
50cdf0e10cSrcweir	print TESTCASE "TEST|@args[1]|MINICALC|@filestuff[0]\n" ;
51cdf0e10cSrcweir	close TESTCASE;
52cdf0e10cSrcweir    }
53cdf0e10cSrcweir
54cdf0e10cSrcweir}
55