1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 18:19:00 +02:00

*** empty log message ***

This commit is contained in:
Jim Meyering
2001-08-18 16:13:16 +00:00
parent b87d62b760
commit 7650a9d9e4
2 changed files with 65 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
AUTOMAKE_OPTIONS = 1.3b gnits
TESTS = basic
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
top_srcdir=$(top_srcdir) \
srcdir=$(srcdir) \
PERL="@PERL@" \
PATH=`pwd`/../../src:$$PATH \
PROG=expr
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
# -*-perl-*-
: ${PERL=perl}
: ${srcdir=.}
case "$PERL" in
*'missing perl')
echo 1>&2 "$0: configure didn't find a usable version of Perl," \
"so can't run this test"
exit 77
;;
esac
d=$srcdir/..
exec $PERL -w -I$d -MFetish -- - << \EOF
require 5.003;
use strict;
(my $program_name = $0) =~ s|.*/||;
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
my @Tests =
(
['invalid-a', '3 + -', {ERR => "$prog: non-numeric argument\n"},
{EXIT => 1}],
['a', '5 + 6', {OUT => '11'}],
);
# Prepend the command line argument and append a newline to end
# of each expected `OUT' string.
my $t;
foreach $t (@Tests)
{
my $arg1 = $t->[1];
my $e;
foreach $e (@$t)
{
$e->{OUT} = "$arg1: $e->{OUT}\n"
if ref $e eq 'HASH' and exists $e->{OUT};
}
}
my $save_temps = $ENV{SAVE_TEMPS};
my $verbose = $ENV{VERBOSE};
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail;
EOF