File: exported.t

package info (click to toggle)
libcrypt-util-perl 0.11-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 252 kB
  • sloc: perl: 2,438; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl

use strict;
use warnings;

use Test::More 'no_plan';

use ok 'Crypt::Util' => (
	qw/:crypt default_key exported_instance encode_string/,
	defaults => {
		key    => "moose",
		encode => 1,
	},
);

is( default_key, "moose", "default key set through defaults" );

default_key("bar");

is( default_key, "bar", "can be used as a setter, too" );

isa_ok( exported_instance, "Crypt::Util" );

like(
	encode_string("eagles may soar, but cows don't get sucked into jet engines"),
	qr/^[a-f0-9]+$/,
	"encode",
);