File: 050_unit.t

package info (click to toggle)
libeval-context-perl 0.09.11-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 292 kB
  • ctags: 23
  • sloc: perl: 762; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 572 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

use strict ;
use warnings ;

use Data::TreeDumper ;

use Test::Exception ;
use Test::Warn;
use Test::NoWarnings qw(had_no_warnings);

use Test::More 'no_plan';
use Test::Block qw($Plan);

use Eval::Context ; 

{
local $Plan = {'CanonizeName' => 3} ;

throws_ok
	{
	Eval::Context::CanonizeName() ;
	} qr/CanonizeName called with undefined argument/, 'invalid input' ;
	
my $uncanonized = '1/;[-|-(_ ' ;
my $canonized = Eval::Context::CanonizeName($uncanonized) ;
is($canonized, '1_________', 'canonized') ;
is(length($canonized), length($uncanonized), 'right length') ;
}