~ubuntu-branches/ubuntu/lucid/coreutils/lucid-updates

« back to all changes in this revision

Viewing changes to tests/misc/mktemp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Stone
  • Date: 2009-02-22 12:36:29 UTC
  • mto: (1.2.1 upstream) (5.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20090222123629-nqyzcikzk591uza2
Tags: upstream-7.1
ImportĀ upstreamĀ versionĀ 7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
# Turn off localization of executable's output.
50
50
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
51
51
my $prog = 'mktemp';
 
52
my $bad_dir = 'no/such/dir';
52
53
 
53
54
my @Tests =
54
55
    (
97
98
      {POST => sub { my ($f) = @_; defined $f or return; chomp $f;
98
99
       check_tmp $f, 'F'; unlink $f; rmdir 'a' or die "rmdir a: $!\n" }}
99
100
     ],
 
101
 
 
102
     ['pipe-bad-tmpdir',
 
103
      {ENV => "TMPDIR=$bad_dir"},
 
104
      {ERR_SUBST => "s,($bad_dir/)[^']+': .*,\$1...,"},
 
105
      {ERR => "$prog: failed to create file via template `$bad_dir/...\n"},
 
106
      {EXIT => 1}],
100
107
    );
101
108
 
102
109
my $save_temps = $ENV{DEBUG};