File: 01-run.t

package info (click to toggle)
libtest-command-simple-perl 0.05-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 104 kB
  • sloc: perl: 135; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;

BEGIN {
    use_ok('Test::Command::Simple');
}

run($^X, qw(-le), 'print q[this is here in the output]');
like(stdout, qr/here in the/, "Output looks ok");
is(length stderr, 0, "No stderr");
is(rc, 0, "Returns ok");

run_ok('echo', 'something else');
like(stdout, qr/mething/);

# check that the return code is tested
run_ok(3, $^X, -le => 'exit 3');

done_testing();