From 25648d2199a002a9210ed663cccd9dacfeaf069a Mon Sep 17 00:00:00 2001 From: pate Date: Thu, 25 Apr 2002 20:15:32 +0000 Subject: [PATCH] more tests, &mkformnotable has reasonable coverage now --- output.t | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 6 deletions(-) diff --git a/output.t b/output.t index 70acf12ab1..6d9c46853e 100644 --- a/output.t +++ b/output.t @@ -1,4 +1,4 @@ -BEGIN { $| = 1; print "1..20\n"; } +BEGIN { $| = 1; print "1..25\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; $loaded = 1; @@ -171,9 +171,9 @@ if ("foo" eq bold('foo')) { @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); +@inputTextarea = qw(textarea textareaname textareavalue); +@inputSubmit = qw(submit submitname submitvalue); +@inputReset = qw(reset resetname resetvalue); # 1 input; hidden @inputs = (\@inputHidden); @@ -213,11 +213,70 @@ if ($return eq mkformnotable('actionurl', @inputs)) { # 1 input; textarea +@inputs = (\@inputTextarea); +$return = "
\n"; +$return .= ""; +$return .= "
"; -# 1 input; reset +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 21\n"; +} else { + print "not ok 21\n"; +} # 1 input; submit +@inputs = (\@inputSubmit); +$return = "
\n"; +$return .= ""; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 22\n"; +} else { + print "not ok 22\n"; +} + +# 1 input; reset +@inputs = (\@inputReset); +$return = "
\n"; +$return .= ""; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 23\n"; +} else { + print "not ok 23\n"; +} # 2 inputs; hidden and submit +@inputs = (\@inputHidden, \@inputSubmit); +$return = "
\n"; +$return .= "\n"; +$return .= ""; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 24\n"; +} else { + print "not ok 24\n"; +} + + +# 3 inputs; text, submit, and reset +@inputs = (\@inputText, \@inputSubmit, \@inputReset); +$return = "
\n"; +$return .= ""; +$return .= ""; +$return .= ""; +$return .= "
"; + +if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 25\n"; +} else { + print "not ok 25\n"; +} + + + + -# 3 inputs; text, reset, and submit -- 2.39.2