1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
4 ######################### We start with some black magic to print on failure.
6 # Change 1..1 below to 1..last_test_to_print .
7 # (It may become useful if the test is moved to ./t subdirectory.)
9 BEGIN { $| = 1; print "1..9\n"; }
10 END {print "not ok 1\n" unless $loaded;}
15 ######################### End of black magic.
17 # Insert your test code below (better if it prints "ok 13"
18 # (correspondingly "not ok 13") depending on the success of chunk 13
23 my($num, $true,$msg) = @_;
24 print($true ? "ok $num\n" : "not ok $num: $msg $@\n");
30 chomp ( my $input = scalar(<STDIN>) );
35 In order to test Net::APP, you need a cleartext APP server available, i.e. a
36 Safe Passage or tunnel or Stunnel <http://www.stunnel.org>, and an account on
39 (i.e. stunnel -P none -c -d 8888 -r appsandbox.criticalpath.net:8889)
43 my $hostname = input "Enter the local (cleartext) APP proxy hostname or IP: ";
44 my $port = input "Enter the local (cleartext) APP proxy port number: ";
45 my $user = input "Enter your APP username: ";
46 my $domain = input "Enter your APP domain: ";
49 my $password = input "Enter your APP password: ";
50 print "\n\n"; system("stty echo");
52 test 2, my $app = new Net::APP ( "$hostname:$port",
55 test 3, $app->login( User => $user,
57 Password => $password,
59 test 4, $app->code == 0;
61 test 6, $app->code == 0;
64 test 6, $app = new Net::APP ( "$hostname:$port",
68 Password => $password,
70 test 7, $app->code == 0;
72 test 9, $app->code == 0;