File: exit-code.t

package info (click to toggle)
ack 2.24-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,704 kB
  • sloc: perl: 8,590; ansic: 21; fortran: 11; makefile: 5; sh: 5
file content (16 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!perl -T

use strict;
use warnings;
use lib 't';

use Test::More tests => 4;
use Util;

prep_environment();

run_ack( 'legislative', 't/text/constitution.txt' );
is( get_rc(), 0, 'Exit code with matches should be 0' );

run_ack( 'foo', 't/text/constitution.txt' );
is( get_rc(), 1, 'Exit code with no matches should be 1' );