File: 05-prompt.t

package info (click to toggle)
libscriptalicious-perl 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 180 kB
  • ctags: 70
  • sloc: perl: 1,150; makefile: 16
file content (20 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use Scriptalicious;

use Test::More tests => 2;

#use t::Util;

my $output = capture( -in => sub { print "Hi there\n17\n"; },
		      #-out2 => $testfile,
		      $^X, "-Mlib=lib", "t/prompter.pl", "--int"
		    );

#my $err = slurp $testfile;

like($output, qr/response: `17'/, "got right answer");
like($output, qr/bad.*`Hi there'/, "spotted wrong answer");

# full test