Update of /cvsroot/koha/koha In directory usw-pr-cvs1:/tmp/cvs-serv24789 Modified Files: Tag: rel-1-2 output.t Log Message: more tests, &mkformnotable has reasonable coverage now Index: output.t =================================================================== RCS file: /cvsroot/koha/koha/Attic/output.t,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -r1.1.2.3 -r1.1.2.4 *** output.t 25 Apr 2002 19:45:01 -0000 1.1.2.3 --- output.t 25 Apr 2002 20:15:32 -0000 1.1.2.4 *************** *** 1,3 **** ! BEGIN { $| = 1; print "1..20\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; --- 1,3 ---- ! BEGIN { $| = 1; print "1..25\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; *************** *** 172,178 **** @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 --- 172,178 ---- @inputRadio = qw(radio radioname radiovalue); @inputText = qw(text textname textvalue); ! @inputTextarea = qw(textarea textareaname textareavalue); ! @inputSubmit = qw(submit submitname submitvalue); ! @inputReset = qw(reset resetname resetvalue); # 1 input; hidden *************** *** 214,223 **** # 1 input; textarea ! # 1 input; reset # 1 input; submit # 2 inputs; hidden and submit - # 3 inputs; text, reset, and submit --- 214,282 ---- # 1 input; textarea + @inputs = (\@inputTextarea); + $return = "<form action=actionurl method=post>\n"; + $return .= "<textarea name=textareaname wrap=physical cols=40 rows=4>textareavalue</textarea>"; + $return .= "</form>"; ! if ($return eq mkformnotable('actionurl', @inputs)) { ! print "ok 21\n"; ! } else { ! print "not ok 21\n"; ! } # 1 input; submit + @inputs = (\@inputSubmit); + $return = "<form action=actionurl method=post>\n"; + $return .= "<input type=submit name=submitname value=\"submitvalue\">"; + $return .= "</form>"; + + if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 22\n"; + } else { + print "not ok 22\n"; + } + + # 1 input; reset + @inputs = (\@inputReset); + $return = "<form action=actionurl method=post>\n"; + $return .= "<input type=reset name=resetname value=\"resetvalue\">"; + $return .= "</form>"; + + 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 = "<form action=actionurl method=post>\n"; + $return .= "<input type=hidden name=hiddenname value=\"hiddenvalue\">\n"; + $return .= "<input type=submit name=submitname value=\"submitvalue\">"; + $return .= "</form>"; + + 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 = "<form action=actionurl method=post>\n"; + $return .= "<input type=text name=textname value=\"textvalue\">"; + $return .= "<input type=submit name=submitname value=\"submitvalue\">"; + $return .= "<input type=reset name=resetname value=\"resetvalue\">"; + $return .= "</form>"; + + if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 25\n"; + } else { + print "not ok 25\n"; + } + + + +
participants (1)
-
Pat Eyler