1 BEGIN { $| = 1; print "1..25\n"; }
2 END {print "not ok 1\n" unless $loaded;}
8 # ensure &startpage returns correct value
10 if ("<html>\n" eq startpage()) {
17 # Check that &gotopage returns proper value
19 if ("<META HTTP-EQUIV=Refresh CONTENT=\"0;URL=http:foo\">" eq gotopage('foo')) {
26 # skipping &startmenu for now
30 # skipping &endmenu for now
33 # ensure &mktablehdr returns a proper value
36 if ("<table border=0 cellspacing=0 cellpadding=5>\n" eq mktablehdr()) {
43 # ensure &mktablerow returns a proper value
45 # 1 row, no background image
46 if ("<tr valign=top bgcolor=red><td>text</td></tr>\n" eq
47 mktablerow(1,'red','text')) {
52 # 1 row, background image
53 if ("<tr valign=top bgcolor=red><td background=\"foo.jpg\">text</td></tr>\n" eq
54 mktablerow(1,'red','text','foo.jpg')) {
59 #2 rows, no background image
60 if ("<tr valign=top bgcolor=red><td>text</td><td>text</td></tr>\n" eq
61 mktablerow(2,'red','text','text')) {
67 # 2 rows, background image
68 if ("<tr valign=top bgcolor=red><td background=\"foo.jpg\">text</td><td background=\"foo.jpg\">text</td></tr>\n" eq
69 mktablerow(2,'red','text','text', 'foo.jpg')) {
76 # ensure mktableft returns the proper value
79 if ("</table>\n" eq mktableft()) {
87 # skipping mkform for now
91 # skipping mkform3 for now
95 # skipping mkform2 for now
99 # ensure endpage returns the proper value
102 if ("</body></html>\n" eq endpage()) {
110 # ensure mklink returns the right value
113 if ("<a href=\"foo.html\">foo</a>" eq mklink('foo.html', 'foo')) {
120 # ensure mkheadr returns the proper value
123 if ("<FONT SIZE=6><em>foo</em></FONT><br>" eq mkheadr(1,'foo')) {
129 if ("<FONT SIZE=6><em>foo</em></FONT>" eq mkheadr(2,'foo')) {
135 if ("<FONT SIZE=6><em>foo</em></FONT><p>" eq mkheadr(3,'foo')) {
142 # test ¢er and &endcenter
145 if ("<CENTER>\n" eq center()) {
151 if ("</CENTER>\n" eq endcenter()) {
158 # ensure bold returns proper value
161 if ("<b>foo</b>" eq bold('foo')) {
168 # ensure &mkformnotable returns a valid value
171 @inputHidden = qw(hidden hiddenname hiddenvalue);
172 @inputRadio = qw(radio radioname radiovalue);
173 @inputText = qw(text textname textvalue);
174 @inputTextarea = qw(textarea textareaname textareavalue);
175 @inputSubmit = qw(submit submitname submitvalue);
176 @inputReset = qw(reset resetname resetvalue);
179 @inputs = (\@inputHidden);
180 $return ="<form action=actionurl method=post>\n";
181 $return .= "<input type=hidden name=hiddenname value=\"hiddenvalue\">\n";
182 $return .= "</form>";
184 if ($return eq mkformnotable('actionurl', @inputs)) {
191 @inputs = (\@inputRadio);
192 $return ="<form action=actionurl method=post>\n";
193 $return .= "<input type=radio name=radioname value=\"radiovalue\">radiovalue\n";
194 $return .= "</form>";
196 if ($return eq mkformnotable('actionurl', @inputs)) {
203 @inputs = (\@inputText);
204 $return = "<form action=actionurl method=post>\n";
205 $return .= "<input type=text name=textname value=\"textvalue\">\n";
206 $return .= "</form>";
208 if ($return eq mkformnotable('actionurl', @inputs)) {
216 @inputs = (\@inputTextarea);
217 $return = "<form action=actionurl method=post>\n";
218 $return .= "<textarea name=textareaname wrap=physical cols=40 rows=4>textareavalue</textarea>\n";
219 $return .= "</form>";
221 if ($return eq mkformnotable('actionurl', @inputs)) {
228 @inputs = (\@inputSubmit);
229 $return = "<form action=actionurl method=post>\n";
230 $return .= "<input type=submit name=submitname value=\"submitvalue\">\n";
231 $return .= "</form>";
233 if ($return eq mkformnotable('actionurl', @inputs)) {
240 @inputs = (\@inputReset);
241 $return = "<form action=actionurl method=post>\n";
242 $return .= "<input type=reset name=resetname value=\"resetvalue\">\n";
243 $return .= "</form>";
245 if ($return eq mkformnotable('actionurl', @inputs)) {
251 # 2 inputs; hidden and submit
252 @inputs = (\@inputHidden, \@inputSubmit);
253 $return = "<form action=actionurl method=post>\n";
254 $return .= "<input type=hidden name=hiddenname value=\"hiddenvalue\">\n";
255 $return .= "<input type=submit name=submitname value=\"submitvalue\">\n";
256 $return .= "</form>";
258 if ($return eq mkformnotable('actionurl', @inputs)) {
265 # 3 inputs; text, submit, and reset
266 @inputs = (\@inputText, \@inputSubmit, \@inputReset);
267 $return = "<form action=actionurl method=post>\n";
268 $return .= "<input type=text name=textname value=\"textvalue\">\n";
269 $return .= "<input type=submit name=submitname value=\"submitvalue\">\n";
270 $return .= "<input type=reset name=resetname value=\"resetvalue\">\n";
271 $return .= "</form>";
273 if ($return eq mkformnotable('actionurl', @inputs)) {