General clean up to make it more like the others.
[dbsrgits/SQL-Translator.git] / t / 11normalize.t
CommitLineData
5db56bf6 1#!/usr/bin/perl
2# vim: set ft=perl:
3
4use Test::More;
5use SQL::Translator::Utils qw(normalize_name);
6
7my %tests = (
8 "silly field (with random characters)" => "silly_field_with_random_characters",
9 "444" => "_444",
10 "hello, world" => "hello_world",
11 "- 9s80 qwehjf 4r" => "_9s80_qwehjf_4r",
12);
13
14plan tests => scalar(keys %tests) + 1;
15
16# Superfluous test, but that's ok
17use_ok("SQL::Translator::Utils");
18
19for my $test (keys %tests) {
20 is(normalize_name($test) => $tests{$test},
21 "normalize_name('$test') => '$tests{$test}'");
22}