diff options
author | Jim Meyering <jim@meyering.net> | 2006-03-26 11:47:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-03-26 11:47:24 +0000 |
commit | c170f9ca7989fba719dd1aa09feb8150f24525e2 (patch) | |
tree | 234f582f45382a0b6f9ae0309f5e35b3efa730de /tests/basename/basic | |
parent | c794482058c4cbdfb16122418c5568dfa8cf0ff6 (diff) | |
download | coreutils-c170f9ca7989fba719dd1aa09feb8150f24525e2.tar.xz |
Move to ../misc/basename
Diffstat (limited to 'tests/basename/basic')
-rwxr-xr-x | tests/basename/basic | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tests/basename/basic b/tests/basename/basic deleted file mode 100755 index 8fd4ad2bb..000000000 --- a/tests/basename/basic +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# -*-perl-*- - -: ${PERL=perl} -: ${srcdir=.} - -$PERL -e 1 > /dev/null 2>&1 || { - echo 1>&2 "$0: configure didn't find a usable version of Perl," \ - "so can't run this test" - exit 77 -} - -d=$srcdir/.. -exec $PERL -w -I$d -MCoreutils -- - << \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 = - ( - ['fail-1', {ERR => "$prog: missing operand\n" - . "Try `$prog --help' for more information.\n"}, {EXIT => '1'}], - ['fail-2', qw(a b c), {ERR => "$prog: extra operand `c'\n" - . "Try `$prog --help' for more information.\n"}, {EXIT => '1'}], - - ['a', qw(d/f), {OUT => 'f'}], - ['b', qw(/d/f), {OUT => 'f'}], - ['c', qw(d/f/), {OUT => 'f'}], - ['d', qw(d/f//), {OUT => 'f'}], - ['e', qw(f), {OUT => 'f'}], - ['f', qw(/), {OUT => '/'}], - ['g', qw(//), {OUT => '/'}], - ['h', qw(///), {OUT => '/'}], - ['i', qw(///a///), {OUT => 'a'}], - ['1', qw(f.s .s), {OUT => 'f'}], - ['2', qw(fs s), {OUT => 'f'}], - ['3', qw(fs fs), {OUT => 'fs'}], - ['4', qw(fs fs), {OUT => 'fs'}], - ['5', qw(dir/file.suf .suf), {OUT => 'file'}], - ); - -# 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} = "$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 |