File: simple-version.t

package info (click to toggle)
libapp-cmd-perl 0.337-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 512 kB
  • sloc: perl: 1,722; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!perl
use strict;
use warnings;

use Test::More;
use App::Cmd::Tester;

use lib 't/lib';

use Test::MySimple;

our $VERSION = '0.123';

my $return = test_app('Test::MySimple', [ qw(--version) ]);

my $stdout = $return->stdout;

like(
  $stdout,
  qr/\S/,
  "Our simple app prints out some version information.",
);

is(
  $stdout,
  "simple-version.t (Test::MySimple::_App_Cmd::0) version $VERSION (t/simple-version.t)\n",
  "Our simple app prints out correct version information",
);

done_testing()