diff options
author | Jim Meyering <jim@meyering.net> | 1998-12-06 23:09:14 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-12-06 23:09:14 +0000 |
commit | dd3bad9b7ce1f0091302009f9c0b651d1e154dbf (patch) | |
tree | 81f98061ba597becc682be535709a80e34b03b3a /tests | |
parent | 6207f6f8040f62fc111c98bcbba63279c43ca6b4 (diff) | |
download | coreutils-dd3bad9b7ce1f0091302009f9c0b651d1e154dbf.tar.xz |
.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ls-2/Makefile.in | 2 | ||||
-rwxr-xr-x | tests/ls-2/quoting | 53 |
2 files changed, 1 insertions, 54 deletions
diff --git a/tests/ls-2/Makefile.in b/tests/ls-2/Makefile.in index 5ef53cb7e..d562380bc 100644 --- a/tests/ls-2/Makefile.in +++ b/tests/ls-2/Makefile.in @@ -99,7 +99,7 @@ TESTS_ENVIRONMENT = \ PATH=../../src:$$PATH \ PROG=ls -TESTS = quoting +TESTS = tests mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = diff --git a/tests/ls-2/quoting b/tests/ls-2/quoting deleted file mode 100755 index 6a3e3819f..000000000 --- a/tests/ls-2/quoting +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -: ${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 - -exec $PERL -w -I$srcdir/.. -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 $mkdir = {PRE => sub {mkdir 'd',0755 or die "d: $!\n"}}; -my $rmdir = {POST => sub {rmdir 'd' or die "d: $!\n"}}; - -my $q_bell = {IN => {"q\a" => ''}}; -my @Tests = - ( - # test-name options input expected-output - # - ['q-', $q_bell, {OUT => "q\a\n"}, {EXIT => 0}], - ['q-N', '-N', $q_bell, {OUT => "q\a\n"}, {ERR => ''}], - ['q-q', '-q', $q_bell, {OUT => "q?\n"}], - ['q-Q', '-Q', $q_bell, {OUT => "\"q\\a\"\n"}], - - ['q-lit-q', '--quoting=literal -q', $q_bell, {OUT => "q?\n"}], - ['q-qs-lit', '--quoting=literal', $q_bell, {OUT => "q\a\n"}], - ['q-qs-sh', '--quoting=shell', $q_bell, {OUT => "q\a\n"}], - ['q-qs-sh-a', '--quoting=shell-always', $q_bell, {OUT => "'q\a'\n"}], - ['q-qs-c', '--quoting=c', $q_bell, {OUT => "\"q\\a\"\n"}], - ['q-qs-esc', '--quoting=escape', $q_bell, {OUT => "q\\a\n"}], - - ['emptydir', 'd', {OUT => ''}, $mkdir, $rmdir], - ['emptydir-x2', 'd d', {OUT => "d:\n\nd:\n"}, $mkdir, $rmdir], - ['emptydir-R', '-R d', {OUT => "d:\n"}, $mkdir, $rmdir], - ); - -my $save_temps = $ENV{SAVE_TEMPS}; -my $verbose = $ENV{VERBOSE}; - -my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; -my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); -exit $fail; -EOF |