3 # This file is part of Acme::Tie::Eleet.
4 # Copyright (c) 2001-2007 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
15 #-----------------------------------#
17 #-----------------------------------#
21 # use POSIX qw(tmpnam);
24 # BEGIN { plan tests => 6 };
25 BEGIN { plan tests => 3 };
28 require Acme::Tie::Eleet;
34 # my $file = tmpnam();
47 #------------------------------#
49 #------------------------------#
52 # open OUT, ">$file" or die "Unable to create temporary file: $!";
53 # tie *OUT, 'Acme::Tie::Eleet', *OUT, @opts, words=>0;
56 # open IN, "<$file" or die "Unable to open temporary file: $!";
58 # ok($line, qr/^sthg/);
61 # open OUT, ">$file" or die "Unable to create temporary file: $!";
62 # tie *OUT, 'Acme::Tie::Eleet', *OUT, @opts, words=>1;
65 # open IN, "<$file" or die "Unable to open temporary file: $!";
67 # ok($line, qr/^haxor/);
69 # # Word replacement with an anonymous array.
70 # open OUT, ">$file" or die "Unable to create temporary file: $!";
71 # tie *OUT, 'Acme::Tie::Eleet', *OUT, @opts, words=>1;
74 # open IN, "<$file" or die "Unable to open temporary file: $!";
76 # ok($line, qr/^(kewl|kool)/);
81 #------------------------------#
83 #------------------------------#
86 tie $line, 'Acme::Tie::Eleet', @opts, words=>0;
92 tie $line, 'Acme::Tie::Eleet', @opts, words=>1;
94 ok($line, qr/^haxor/);
97 # Word replacement with an anonymous array.
98 tie $line, 'Acme::Tie::Eleet', @opts, words=>1;
100 ok($line, qr/^(kewl|kool)/);