File: 9bug-taking-extension-from-path.t

package info (click to toggle)
libconfig-zomg-perl 1.000000-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 264 kB
  • sloc: perl: 352; makefile: 9; sh: 4
file content (17 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

use Config::ZOMG::Source::Loader;

sub file_extension ($) { Config::ZOMG::Source::Loader::file_extension shift }

is( file_extension 'test.conf', 'conf' );
is( file_extension '...', undef );
is( file_extension '../.', undef );
is( file_extension '.../.', undef );
is( file_extension 't/assets/order/..', undef );
is( file_extension 't/assets/dir.cnf', undef );

done_testing;