Update of /cvsroot/koha/koha In directory usw-pr-cvs1:/tmp/cvs-serv10049 Modified Files: Tag: rel-1-2 output.t Log Message: more tests Index: output.t =================================================================== RCS file: /cvsroot/koha/koha/Attic/output.t,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -r1.1.2.2 -r1.1.2.3 *** output.t 25 Apr 2002 16:11:50 -0000 1.1.2.2 --- output.t 25 Apr 2002 19:45:01 -0000 1.1.2.3 *************** *** 1,3 **** ! BEGIN { $| = 1; print "1..17\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; --- 1,3 ---- ! BEGIN { $| = 1; print "1..20\n"; } END {print "not ok 1\n" unless $loaded;} use C4::Output; *************** *** 93,100 **** # - # skipping mkformnotable for now - # - - # # skipping mkform2 for now # --- 93,96 ---- *************** *** 168,169 **** --- 164,223 ---- 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 ="<form action=actionurl method=post>\n"; + $return .= "<input type=hidden name=hiddenname value=\"hiddenvalue\">\n"; + $return .= "</form>"; + + if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 18\n"; + } else { + print "not ok 18\n"; + } + + # 1 input; radio + @inputs = (\@inputRadio); + $return ="<form action=actionurl method=post>\n"; + $return .= "<input type=radio name=radioname value=radiovalue>radiovalue"; + $return .= "</form>"; + + if ($return eq mkformnotable('actionurl', @inputs)) { + print "ok 19\n"; + } else { + print "not ok 19\n"; + } + + # 1 input; text + @inputs = (\@inputText); + $return = "<form action=actionurl method=post>\n"; + $return .= "<input type=text name=textname value=\"textvalue\">"; + $return .= "</form>"; + + 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