From 07902f96e89c19e1a84527f16e740548df724043 Mon Sep 17 00:00:00 2001 From: rangi Date: Sun, 17 Jun 2007 23:35:36 +0000 Subject: [PATCH] Working on unit tests --- misc/testKoha.pl | 4 ++++ t/Accounts.t | 5 +++++ t/Acquisition.t | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 t/Accounts.t create mode 100644 t/Acquisition.t diff --git a/misc/testKoha.pl b/misc/testKoha.pl index d34fc8a4e1..af8d22e981 100644 --- a/misc/testKoha.pl +++ b/misc/testKoha.pl @@ -27,6 +27,7 @@ use Test::Harness; # Please make the test name the same as the module name where possible my @tests=( + 't/Accounts.t', 't/format.t', 't/Input.t', 't/koha.t', @@ -41,6 +42,9 @@ runtests (@tests); exit; # $Log$ +# Revision 1.2 2007/06/17 23:35:36 rangi +# Working on unit tests +# # Revision 1.1 2002/11/22 09:05:18 tipaul # moving non koha-running files to misc dir # diff --git a/t/Accounts.t b/t/Accounts.t new file mode 100644 index 0000000000..071600447b --- /dev/null +++ b/t/Accounts.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n"; } +END {print "not ok 1\n" unless $loaded;} +use C4::Accounts; +$loaded = 1; +print "ok 1\n"; diff --git a/t/Acquisition.t b/t/Acquisition.t new file mode 100644 index 0000000000..41fccacb9d --- /dev/null +++ b/t/Acquisition.t @@ -0,0 +1,20 @@ +BEGIN { $| = 1; print "1..3\n"; } +END {print "not ok 1\n" unless $loaded;} +use C4::Acquisition; +$loaded = 1; +print "ok 1\n"; + +$basketno=NewBasket(1,1); +if ($basketno){ + print "ok 2\n"; +} +else { + print "not ok 2\n"; +} + +if ($basket=GetBasket($basketno)){ + print "ok 3\n"; +} +else { + print "not ok 3\n"; +} -- 2.39.2