Skip Menu |

This queue is for tickets about the Business-OnlinePayment-Exact CPAN distribution.

Report information
The Basics
Id: 35084
Status: new
Priority: 0/
Queue: Business-OnlinePayment-Exact

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.01
Fixed in: (no value)



Subject: Use prompt() in t/Business-OnlinePayment-Exact.t to Allow Automated Tests
Dear MOCK, Hi. This is imacat from Taiwan. I found that the t/Business-OnlinePayment-Exact.t of your Business-OnlinePayment-Exact-0.01 stops if nothing is read from keyboard. I would suggest that you use prompt() from ExtUtils::MakeMaker instead of obtaining input from Term::Readline, as suggested in the ExtUtils::MakeMaker document, so that the it can continue. <<ExtUtils::MakeMaker>> Other Handy Functions http://search.cpan.org/perldoc?ExtUtils::MakeMaker#Other_Handy_Functions I made a simple patch to Business-OnlinePayment-Exact-0.01, in the hope that it helps. Please tell me if you have any question, or if I could be of any help. Thank you.
Subject: Business-OnlinePayment-Exact-0.01-prompt.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Business-OnlinePayment-Exact-0.01.orig/Makefile.PL Business-OnlinePayment-Exact-0.01/Makefile.PL - --- Business-OnlinePayment-Exact-0.01.orig/Makefile.PL 2005-04-01 11:40:17.000000000 +0800 +++ Business-OnlinePayment-Exact-0.01/Makefile.PL 2008-04-16 02:36:04.000000000 +0800 @@ -6,8 +6,6 @@ NAME => 'Business::OnlinePayment::Exact', VERSION_FROM => 'lib/Business/OnlinePayment/Exact.pm', # finds $VERSION PREREQ_PM => {'Test::More' => 0, - - 'Term::ReadLine' => 0, - - 'Term::ReadLine::Gnu' => 0, 'Business::OnlinePayment' => '2.01', 'SOAP::Lite' => '0.65_3'}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 diff -u -r Business-OnlinePayment-Exact-0.01.orig/README Business-OnlinePayment-Exact-0.01/README - --- Business-OnlinePayment-Exact-0.01.orig/README 2005-04-01 11:54:38.000000000 +0800 +++ Business-OnlinePayment-Exact-0.01/README 2008-04-16 02:36:04.000000000 +0800 @@ -19,7 +19,6 @@ Test::More Business::OnlinePayment SOAP::Lite - - Term::ReadLine::GNU - for testing COPYRIGHT AND LICENCE diff -u -r Business-OnlinePayment-Exact-0.01.orig/t/Business-OnlinePayment-Exact.t Business-OnlinePayment-Exact-0.01/t/Business-OnlinePayment-Exact.t - --- Business-OnlinePayment-Exact-0.01.orig/t/Business-OnlinePayment-Exact.t 2005-04-01 11:43:12.000000000 +0800 +++ Business-OnlinePayment-Exact-0.01/t/Business-OnlinePayment-Exact.t 2008-04-16 02:36:16.000000000 +0800 @@ -6,7 +6,7 @@ # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 8; - -use Term::ReadLine; +use ExtUtils::MakeMaker; BEGIN { use_ok('Business::OnlinePayment::Exact') }; ######################### @@ -14,22 +14,19 @@ # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. - -my $term = new Term::ReadLine 'E-Xact Test'; +SKIP: { + diag("Please enter a test account for E-Xact"); - -my $prompt = "ExactID: "; - -my $login = $term->readline($prompt); +my $login = prompt("ExactID:"); +skip "Cannot continue without ExactID", 7 if !$login; diag("Please enter the password for the test account $login"); - -$prompt = "Password: "; - -my $pass = $term->readline($prompt); +my $pass = prompt("Password:"); diag("Please enter a valid credit card to test (it will not be charged)"); - -$prompt = "Card Number: "; - -my $card = $term->readline($prompt); +my $card = prompt("Card Number:"); diag("Please enter an expiry date for the card in the form MMYY"); - -$prompt = "Expiry: "; - -my $expiry = $term->readline($prompt); +my $expiry = prompt("Expiryr:"); diag("Please enter a name to match the card"); - -$prompt = "Name: "; - -my $name = $term->readline($prompt); +my $name = prompt("Name:"); my $tx; ok($tx = new Business::OnlinePayment('Exact'), 'New Exact'); @@ -54,4 +51,4 @@ my $on; ok($on = $tx->order_number(), "order number $on"); - - +} -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkgE9bQACgkQi9gubzC5S1x4xQCgmFOLHaNAu4t246h8iIz2gOCr 95MAoIL5jLCrW7zKZkae2GVQtkKlO3Zi =ha4n -----END PGP SIGNATURE-----