1#!/usr/local/bin/perl
2#########################################################################
3
4 #*************************************************************************
5 #
6# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7#
8# Copyright 2000, 2010 Oracle and/or its affiliates.
9#
10# OpenOffice.org - a multi-platform office productivity suite
11#
12# This file is part of OpenOffice.org.
13#
14# OpenOffice.org is free software: you can redistribute it and/or modify
15# it under the terms of the GNU Lesser General Public License version 3
16# only, as published by the Free Software Foundation.
17#
18# OpenOffice.org is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21# GNU Lesser General Public License version 3 for more details
22# (a copy is included in the LICENSE file that accompanied this code).
23#
24# You should have received a copy of the GNU Lesser General Public License
25# version 3 along with OpenOffice.org.  If not, see
26# <http://www.openoffice.org/license.html>
27# for a copy of the LGPLv3 License.
28#
29 #*************************************************************************
30
31open(TESTFILE, $ARGV[0]);
32
33while (<TESTFILE>)
34{
35    if ($_[1] eq "-q")
36    {
37	chomp $_;
38	@args = split('\|', $_);
39	@filestuff = split('\.', @args[0]);
40	$filename = @filestuff[0] . ".infile";
41	open (TESTCASE, ">$filename") || die "Error opening $filename";
42	print TESTCASE "# @args[1]\n# @args[2]\n";
43	print TESTCASE "TEST|@args[1]|QUICKWORD|@filestuff[0]\n" ;
44	close TESTCASE;
45    }
46    if ($_[1] eq "-m")
47    {
48	chomp $_;
49	@args = split('\|', $_);
50	@filestuff = split('\.', @args[0]);
51	$filename = @filestuff[0] . ".infile";
52	open (TESTCASE, ">$filename") || die "Error opening $filename";
53	print TESTCASE "# @args[1]\n# @args[2]\n";
54	print TESTCASE "TEST|@args[1]|MINICALC|@filestuff[0]\n" ;
55	close TESTCASE;
56    }
57
58}
59