[dw-free] clean-embed tests failing when memcached is disabled
[commit: http://hg.dwscoalition.org/dw-free/rev/2bd57d9f7bf5]
http://bugs.dwscoalition.org/show_bug.cgi?id=3513
Accept a certain amount of whitespace in the results returned by the HTML
cleaner.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3513
Accept a certain amount of whitespace in the results returned by the HTML
cleaner.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- t/clean-embed.t
-------------------------------------------------------------------------------- diff -r f91104d03d57 -r 2bd57d9f7bf5 t/clean-embed.t --- a/t/clean-embed.t Wed Feb 16 16:10:51 2011 -0600 +++ b/t/clean-embed.t Thu Feb 17 17:51:10 2011 +0800 @@ -218,9 +218,9 @@ note( "Testing parse_embed (We parse the qq{foo <site-embed id="1"> </site-embed> bar}, qq{foo <site-embed id="1"/> bar}, - qq{foo <site-embed id="1"></site-embed> bar}, + qr{foo <site-embed id="1">\s*</site-embed> bar}, qr{foo $iframe bar}, - qq{}, + qr{\s*}, ], @@ -407,7 +407,11 @@ note( "Testing parse_embed (We parse the # edit the post my $expanded_entry = $got_post_saved; LJ::EmbedModule->expand_entry( $u, \$expanded_entry, edit => 1 ); - is( $expanded_entry, $expected_edit, "expand_entry: $title" ); + if ( ref $expected_edit && ref $expected_edit eq "Regexp" ) { + like( $expanded_entry, $expected_edit, "expand entry: $title" ); + } else { + is( $expanded_entry, $expected_edit, "expand_entry: $title" ); + } # view the post in your journal (get iframe if applicable) my $viewed_entry = $got_post_saved; @@ -436,6 +440,10 @@ note( "Testing parse_embed (We parse the # check the iframe contents # LJ::EmbedModule takes the content and cleans it my $got_embed = LJ::EmbedModule->module_content( journalid => $u->userid, moduleid => 1 ); - is( $got_embed, $expected_iframe, "clean_embed: $title" ); + if( ref $expected_iframe && ref $expected_iframe eq "Regexp" ) { + like( $got_embed, $expected_iframe, "clean_embed: $title" ); + } else { + is( $got_embed, $expected_iframe, "clean_embed: $title" ); + } } } --------------------------------------------------------------------------------
no subject
no subject
no subject
no subject
no subject
I think that worked... heh first time using pastebin.
no subject
Umm. This looks like another versioning issue though. The version I have of HTML::TokeParser is 3.57, whereas the one on the 'hack is 2... something. The one in prod is similar to my version so I think it'd behave the same way.
no subject
no subject
no subject
I guess I should probably think of reinstalling the whole thing with a new version of Ubuntu...