Akron | 5fb5e8d | 2020-07-23 17:45:13 +0200 | [diff] [blame] | 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | |
| 5 | use FindBin; |
| 6 | BEGIN { |
| 7 | unshift @INC, "$FindBin::Bin/../lib"; |
| 8 | }; |
| 9 | |
| 10 | use_ok('Test::KorAP::XML::TEI','korap_tempfile'); |
| 11 | |
| 12 | my ($fh, $filename) = korap_tempfile('test'); |
| 13 | ok($fh, 'Filehandle created'); |
| 14 | ok($filename, 'Filename returned'); |
| 15 | close($fh); |
| 16 | |
| 17 | like($filename, qr!KorAP-XML-TEI_test_.+?\.tmp$!, 'Filename pattern'); |
| 18 | |
| 19 | ($fh, $filename) = korap_tempfile(); |
| 20 | ok($fh, 'Filehandle created'); |
| 21 | ok($filename, 'Filename returned'); |
| 22 | close($fh); |
| 23 | |
| 24 | like($filename, qr!KorAP-XML-TEI_.+?\.tmp$!, 'Filename pattern'); |
| 25 | |
| 26 | done_testing; |