fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-09-07 07:46 am

[dw-free] remove t/svn-mime-types.t

[commit: http://hg.dwscoalition.org/dw-free/rev/f4cdf352d249]

http://bugs.dwscoalition.org/show_bug.cgi?id=3012

We no longer use SVN.

Patch by [personal profile] kareila.

Files modified:
  • t/svn-mime-types.t
--------------------------------------------------------------------------------
diff -r 80975f5cd3ae -r f4cdf352d249 t/svn-mime-types.t
--- a/t/svn-mime-types.t	Tue Sep 07 15:36:09 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use Test::More;
-
-unless ($ENV{TEST_SVN_MIME}) {
-    plan skip_all => "Run with env TEST_SVN_MIME set true to run this test.";
-    exit 0;
-}
-
-my %check;
-my @files = `$ENV{LJHOME}/bin/cvsreport.pl --map`;
-foreach my $line (@files) {
-    chomp $line;
-    $line =~ s!//!/!g;
-    my ($rel, $path) = split(/\t/, $line);
-    next unless $path =~ /\.(gif|jpe?g|png|ico)$/i;
-    $check{$path} = 1;
-}
-
-plan tests => scalar keys %check;
-
-my %badfiles;
-
-foreach my $f (sort keys %check) {
-    $f =~ s!^(\w+)/!!;
-    my $dir = $1;
-    chdir("$ENV{LJHOME}/cvs/$dir") or die;
-    unless (-d ".svn") {
-        ok(1, "$f: isn't svn");
-        next;
-    }
-    my @props = `svn pl -v $f`;
-    my %props;
-    foreach my $line (@props) {
-        next unless $line =~ /^\s+(\S+)\s*:\s*(.+)/;
-        $props{$1} = $2;
-    }
-
-    my $mtype = $props{'svn:mime-type'} || "";
-    my @errors;
-    if ($props{'svn:eol-style'}) {
-        push @errors, "EOL set";
-    }
-    if (! $mtype || $mtype =~ /^text/) {
-        push @errors, "MIME=$mtype";
-    }
-
-    ok(! @errors, "$f: @errors");
-
-    if (@errors) {
-        my $oldfile = eval { slurp("$ENV{LJHOME}/cvs/$dir-oldcvs/$f") };
-        my $newfile = slurp("$ENV{LJHOME}/cvs/$dir/$f");
-        if ($oldfile && $oldfile eq $newfile) {
-            # we can safely just fixup the mime types
-            system("svn", "pdel", "svn:eol-style", $f);
-            system("svn", "pset", "svn:mime-type", "application/octet-stream", $f);
-            next;
-        }
-
-        push @errors, "Files don't match" if $oldfile && $oldfile ne $newfile;
-
-        $badfiles{$f} = \@errors;
-
-
-    }
-}
-
-sub slurp {
-    my $f = shift;
-    open(my $fh, $f) or die;
-    return do { local $/; <$fh>; };
-}
-
-use Data::Dumper;
-if (%badfiles) {
-    warn Dumper(\%badfiles);
-}
-
-exit 0;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org