xref: /openbsd-src/gnu/usr.bin/perl/ext/FileCache/t/07noimport.t (revision f2a19305cfc49ea4d1a5feb55cd6c283c6f1e031)
1b39c5158Smillert#!./perl -w
2b39c5158Smillert
3b39c5158Smillertuse Test::More tests => 1;
4b39c5158Smillert
5b39c5158Smillert# Try using FileCache without importing to make sure everything's
6b39c5158Smillert# initialized without it.
7b39c5158Smillert{
8b39c5158Smillert    package Y;
9b39c5158Smillert    use FileCache ();
10b39c5158Smillert
11*f2a19305Safresh1    my $file = 'foo_noimp';
12b39c5158Smillert    END { unlink $file }
13b39c5158Smillert    FileCache::cacheout($file);
14b39c5158Smillert    print $file "bar";
15b39c5158Smillert    close $file;
16b39c5158Smillert
17b39c5158Smillert    FileCache::cacheout("<", $file);
18b39c5158Smillert    ::ok( <$file> eq "bar" );
19b39c5158Smillert    close $file;
20b39c5158Smillert}
21