use strict; use warnings; use lib qw( ./lib ../lib ); use Test::More; use Cwd; use CSS::Inliner; plan(tests => 7); my $html = < Test Document

Howdy!

Ahoy!

Hello!

Hola!

Gudentag!

Dziendobre!

END my $inliner = CSS::Inliner->new(); $inliner->read({html => $html}); my $css = $inliner->_css(); #shuffle stored styles around my $shuffle1 = 0; foreach (keys %{$css}) { $shuffle1++;} #shuffle stored styles around more my $shuffle2 = 0; while ( each %{$css} ) {$shuffle2++;} my $inlined = $inliner->inlinify(); ok($shuffle1 == $shuffle2); ok($inlined =~ m/

Howdy!<\/h1>/, 'order #1'); ok($inlined =~ m/

Ahoy!<\/h1>/, 'order #2'); ok($inlined =~ m/

Hello!<\/h1>/, 'order #3'); ok($inlined =~ m/

Hola!<\/h1>/, 'order #4'); ok($inlined =~ m/

Gudentag!<\/h1>/, 'order #5'); ok($inlined =~ m/

Dziendobre!<\/h1>/, 'order #6');