File: 13-eof_interactive.t

package info (click to toggle)
libio-pager-perl 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 284 kB
  • sloc: perl: 1,416; makefile: 14
file content (27 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (2)
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
use strict;
use warnings;
use File::Temp;
use Test::More 0.88;
require './t/TestUtils.pm';
t::TestUtils->import();

use bignum;
use IO::Pager::Page;

SKIP: {
  skip_interactive();

  $a=1; $b=1;
  eval{
    print $a, "\n";

    #Fibonacci is the golden ratio
    ($a,$b)=($b,$a+$b);
  } until( eof(*STDOUT) );

  print "Pager closed, wrapping up.\n";
  my $A = prompt("\nWere things wrapped up after you quit the pager? [Yn]");
  ok is_yes($A), 'Signal handling EOF';
}

done_testing;