0713d17447deb0a3015b21eb67ef9af654ae4c64
[dbsrgits/SQL-Translator.git] / t / 12header_comment.t
1 #!/usr/bin/perl
2 # vim: set ft=perl:
3
4 use Test::More;
5 use SQL::Translator::Utils qw($DEFAULT_COMMENT header_comment);
6
7 plan tests => 5;
8
9 # Superfluous test, but that's ok
10 use_ok("SQL::Translator::Utils");
11
12 is($DEFAULT_COMMENT, '-- ', 'default comment');
13 like(header_comment("foo"), qr/[-][-] Created by foo/, "Created by...");
14
15 my $comm = header_comment("My::Producer",
16                           $DEFAULT_COMMENT,
17                           "Hi mom!");
18 like($comm, qr/[-][-] Created by My::Producer/, 'Multiline header comment...');
19 like($comm, qr/[-][-] Hi mom!/, '...with additional junk');