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:
@@ -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
|
||||
Executable
+54
@@ -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
|
||||
Reference in New Issue
Block a user