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