summaryrefslogtreecommitdiff
path: root/fml/lib/IO/t/file_sequence_replace.pl
blob: 5e1c21eb906cc3b36279c23ed94b9394957dd1e1 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env perl
#-*- perl -*-
#
#  Copyright (C) 2004 Ken'ichi Fukamachi
#   All rights reserved. This program is free software; you can
#   redistribute it and/or modify it under the same terms as Perl itself.
#
# $FML: sequence.pl,v 1.1 2004/04/11 12:58:40 fukachan Exp $
#

use strict;
use Carp;

my $debug = 0;
my $i     = 0;
my $file  = "/tmp/io.$$";
my $map   = "file:$file";
my %log   = ();
my %pid   = ();
my $fail  = 0;
my $reason = '';

use FML::Test::Utils;
my $tool = new FML::Test::Utils;
$tool->set_title("file sequence replace");

use IO::Adapter;
my $obj = new IO::Adapter $map;
$obj->sequence_replace(10);
if ($obj->error()) {
    $reason .= $obj->error();
    $reason .= "\t\n";
    $fail++;
}

if ($fail) {
    $tool->print_error($reason);
}
else {
    $tool->print_ok();
}

exit 0;