From 4355e4c541a6736a45db5198a15b7649625bbd49 Mon Sep 17 00:00:00 2001 From: pate Date: Thu, 25 Apr 2002 19:45:01 +0000 Subject: [PATCH] more tests --- output.t | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/output.t b/output.t index 78f18a2025..70acf12ab1 100644 --- a/output.t +++ b/output.t @@ -1,4 +1,4 @@ -BEGIN { $| = 1; print "1..17\n"; } +BEGIN { $| = 1; print "1..20\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; $loaded = 1; @@ -91,10 +91,6 @@ if ("\n" eq mktableft()) { # skipping mkform3 for now # -# -# skipping mkformnotable for now -# - # # skipping mkform2 for now # @@ -167,3 +163,61 @@ if ("foo" eq bold('foo')) { } else { print "not ok\n"; } + +# +# ensure &mkformnotable returns a valid value +# + +@inputHidden = qw(hidden hiddenname hiddenvalue); +@inputRadio = qw(radio radioname radiovalue); +@inputText = qw(text textname textvalue); +#@inputTextarea = qw(textarea testareaname textareavalue); +#@inputSubmit = qw(submit submitname submitvalue); +#@inputReset = qw(reset resetname resetvalue); + +# 1 input; hidden +@inputs = (\@inputHidden); +$return ="
\n"; +$return .= "\n"; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 18\n"; +} else { + print "not ok 18\n"; +} + +# 1 input; radio +@inputs = (\@inputRadio); +$return ="
\n"; +$return .= "radiovalue"; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 19\n"; +} else { + print "not ok 19\n"; +} + +# 1 input; text +@inputs = (\@inputText); +$return = "
\n"; +$return .= ""; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 20\n"; +} else { + print "not ok 20\n"; +} + + +# 1 input; textarea + +# 1 input; reset + +# 1 input; submit + +# 2 inputs; hidden and submit + +# 3 inputs; text, reset, and submit -- 2.39.2