Subject: | Allowing Automated Tests |
Dear Collin Starkweather,
Hi. This is imacat from Taiwan. I found that your Net-Peep-0.4.5.1
cannot be tested automatically, due to that, human Ctrl-C is required to
stop t/scheduler.t if test fails. I tried to made a simple patch
against Net-Peep-0.4.5.1, so that it does not need human Ctrl-C to know
it fails. I shall help Net-Peep-0.4.5.1 be more throughly tested by
CPAN smoke testers.
Hope that this helps. Please tell me if there is any proble, or if
I could be of any help. Thank you.
Subject: | Net-Peep-0.4.5.1-auto.diff |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -u -r Net-Peep-0.4.5.1.orig/t/scheduler.t Net-Peep-0.4.5.1/t/scheduler.t
- --- Net-Peep-0.4.5.1.orig/t/scheduler.t 2001-09-24 10:53:23.000000000 +0800
+++ Net-Peep-0.4.5.1/t/scheduler.t 2008-04-16 03:04:43.000000000 +0800
@@ -45,8 +45,6 @@
installed on which just so happens to be listening to port 2001, you
should hear a sound in 3 seconds, then 5 seconds.
- -If nothing happens for more than 10 seconds, press Ctrl-C.
- -
Press enter to continue ....
eop
@@ -62,7 +60,12 @@
$scheduler1->schedulerAddEvent('test', 3, 0, 'first', sub { &handler(3,$pecker) } );
$scheduler1->schedulerAddEvent('test', 6, 0, 'third', sub { $$ref = 0 } );
- -while (1) { last unless $continue; }
+sleep 10;
+if ($continue) {
+ print "not ok # nothing happens\n";
+ print "not ok # nothing happens\n";
+ print "not ok # nothing happens\n";
+}
print "ok\n";
exit 0;
@@ -86,7 +89,7 @@
};
if ($@) {
- - print STDERR "not ok: $@";
+ print "not ok: $@";
} else {
print "ok\n";
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkgE/GoACgkQi9gubzC5S1wLUACcDsir5vOn7xDGeXRr4NVddvyB
tB4An2VvLiD60nXyn2IbYFIgYaSEpdWr
=KVum
-----END PGP SIGNATURE-----