Akron | c4ec093 | 2020-08-06 09:19:22 +0200 | [diff] [blame] | 1 | use strict; |
| 2 | use warnings; |
| 3 | use utf8; |
| 4 | use Test::More; |
| 5 | use lib 'lib', '../lib'; |
| 6 | |
| 7 | use_ok('KorAP::XML::Krill', 'get_file_name_from_glob'); |
| 8 | |
| 9 | is( |
| 10 | get_file_name_from_glob('versuch'), |
| 11 | 'versuch' |
| 12 | ); |
| 13 | |
| 14 | is( |
| 15 | get_file_name_from_glob('versuch/alt\seltsam'), |
| 16 | 'versuch-alt-seltsam' |
| 17 | ); |
| 18 | |
| 19 | is( |
| 20 | get_file_name_from_glob('versuch/*.xml'), |
| 21 | 'versuch-.xml' |
| 22 | ); |
| 23 | |
| 24 | is( |
| 25 | get_file_name_from_glob('versuch//[a-z]{2,4}.xml'), |
| 26 | 'versuch-a-z-2-4-.xml' |
| 27 | ); |
| 28 | |
| 29 | is( |
| 30 | get_file_name_from_glob('versuch//[a-z]{2,4}.zip'), |
| 31 | 'versuch-a-z-2-4' |
| 32 | ); |
| 33 | |
| 34 | done_testing; |