File: 01-strings.t

package info (click to toggle)
libconstant-generate-perl 0.17-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 156 kB
  • sloc: perl: 465; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
use strict;
use warnings;
use blib;
use Test::More;

use Constant::Generate [qw(
    FOO
    BAR
    BAZ
)], -type => "str",
    -prefix => "my_",
    -mapname => 'const_str';

ok(my_FOO eq 'FOO', 'prefixed string constants');
is(const_str(my_FOO), 'FOO', 'string constant mapping');

done_testing();