SVN: toys/rsget.pl/t: . check prepare
sparky
sparky at pld-linux.org
Sun Feb 21 02:53:06 CET 2010
Author: sparky
Date: Sun Feb 21 02:53:05 2010
New Revision: 11152
Added:
toys/rsget.pl/t/
toys/rsget.pl/t/check (contents, props changed)
toys/rsget.pl/t/prepare (contents, props changed)
Log:
- added some download tests
Added: toys/rsget.pl/t/check
==============================================================================
--- (empty file)
+++ toys/rsget.pl/t/check Sun Feb 21 02:53:05 2010
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my $file = undef;
+while ( <> ) {
+ if ( /^DONE:(?: | .+ )fname=(\S+) / ) {
+ $file = $1;
+ } elsif ( s/^#\s*md5sum:\s*// ) {
+ my $md5 = `md5sum $file`;
+ if ( $md5 ne $_ ) {
+ print "md5 mismatch:\n";
+ print "-$_";
+ print "+$md5\n";
+ } else {
+ print "OK: $file\n";
+ }
+ }
+}
Added: toys/rsget.pl/t/prepare
==============================================================================
--- (empty file)
+++ toys/rsget.pl/t/prepare Sun Feb 21 02:53:05 2010
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+while ( <> ) {
+ if ( /#\s*src:\s*(.+)/ ) {
+ print;
+ print $1 . "\n";
+ } elsif ( /^(#.*|)$/ ) {
+ print;
+ }
+}
More information about the pld-cvs-commit
mailing list