Debian Codegraph @

t/test_template

raw
1 # test
2
3 use strict ;
4 use warnings ;
5
6 use Data::TreeDumper ;
7
8 use Test::Exception ;
9 use Test::Warn;
10 use Test::NoWarnings qw(had_no_warnings);
11
12 use Test::More 'no_plan';
13 use Test::Block qw($Plan);
14
15 use Eval::Context ;
16
17 {
18 local $Plan = {'' => } ;
19
20 is(result, expected, "message") ;
21 }
22
23 =comment
24
25 {
26 local $Plan = {'' => } ;
27
28 is(result, expected, 'message') ;
29
30 throws_ok
31 {
32
33 } qr//, '' ;
34
35 lives_ok
36 {
37
38 } '' ;
39
40 like(result, qr//, '') ;
41
42 warning_like
43 {
44 } qr//i, '';
45
46 warnings_like
47 {
48 }
49 [
50 qr//i,
51 qr//i,
52 ] '';
53
54
55 is_deeply
56 (
57 generated,
58 [],
59 ''
60 ) ;
61
62
63 use Directory::Scratch ;
64 my $temp = Directory::Scratch->new();
65 my $dir = $temp->mkdir('foo/bar');
66 my $file = $temp->touch('foo/bar/baz', qw(This is a file with lots of lines));
67
68
69 use Directory::Scratch::Structured qw(create_structured_tree piggyback_directory_scratch) ;
70 my %tree_structure =
71 (
72 file_0 => [] ,
73
74 dir_1 =>
75 {
76 subdir_1 =>{},
77 file_1 =>[],
78 file_a => [],
79 },
80 ) ;
81
82 my $temporary_directory = create_structured_tree(%tree_structure) ;
83 $base = $temporary_directory->base() ;
84
85 my $scratch = Directory::Scratch->new;
86 $scratch->create_structured_tree(%tree_structure) ;
87 }
88
89 =cut