Commit | Line | Data |
631aafb6 |
1 | #!/usr/bin/perl |
2 | # vim: set ft=perl: |
3 | |
b30f8707 |
4 | use strict; |
5 | use Test::More tests => 5; |
631aafb6 |
6 | use SQL::Translator::Utils qw($DEFAULT_COMMENT header_comment); |
7 | |
631aafb6 |
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'); |