summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests/write18-quote-test.pl
blob: d0daabdd054614c38a5a597839ad569f3416039d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl
# $Id$
# Public domain.  Originally written 2010, Karl Berry.
# Check that restricted shell invocation doesn't misquote.

BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `dirname $0`); }
require "$srcdir/../tests/common-test.pl";

exit (&main ());

sub main
{  
  $badfile = "write18-quote-newfile.tex";
  unlink ($badfile);  # ensure no leftover from previous test
  
  my @args = (qw(-ini -shell-restricted), "$srcdir/tests/write18-quote.tex");
  my $ret = &test_run ("./tex", @args);

  my $bad = -f $badfile;  # file should not have been created
  return $bad;
}