File: test_template

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 (89 lines) | stat: -rw-r--r-- 1,150 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# test

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 = {'' => } ;

is(result, expected, "message") ;
}

=comment

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

is(result, expected, 'message') ;

throws_ok
	{
	
	} qr//, '' ;

lives_ok
	{
	
	} '' ;

like(result, qr//, '') ;

warning_like
	{
	} qr//i, '';

warnings_like
	{
	}
	[
	qr//i,
	qr//i,
	] '';


is_deeply
	(
	generated,
	[],
	''
	) ;


use Directory::Scratch ;
my $temp = Directory::Scratch->new();
my $dir  = $temp->mkdir('foo/bar');
my $file = $temp->touch('foo/bar/baz', qw(This is a file with lots of lines));


use Directory::Scratch::Structured qw(create_structured_tree piggyback_directory_scratch) ; 
my %tree_structure =
	(
	file_0 => [] ,
	
	dir_1 =>
		{
		subdir_1 =>{},
		file_1 =>[],
		file_a => [],
		},
	) ;

my $temporary_directory = create_structured_tree(%tree_structure) ;
$base = $temporary_directory->base() ;

my $scratch = Directory::Scratch->new;
$scratch->create_structured_tree(%tree_structure) ;
}

=cut