Integrate mainline (STDCHAR)
[p5sagit/p5-mst-13.2.git] / t / lib / cgi-html.t
index 21bbcfb..3d3da10 100755 (executable)
@@ -33,14 +33,6 @@ sub test {
     print($true ? "ok $num\n" : "not ok $num $msg\n");
 }
 
-my $CRLF = "\015\012";
-if ($^O eq 'VMS') { 
-    $CRLF = "\n";  # via web server carriage is inserted automatically
-}
-if (ord("\t") != 9) { # EBCDIC?
-    $CRLF = "\r\n";
-}
-
 # all the automatic tags
 test(2,h1() eq '<h1 />',"single tag");
 test(3,h1('fred') eq '<h1>fred</h1>',"open/close tag");
@@ -90,7 +82,12 @@ test(19,end_h3 eq '</h3>');
 test(20,start_table({-border=>undef}) eq '<table border>');
 test(21,h1(escapeHTML("this is <not> \x8bright\x9b")) eq '<h1>this is &lt;not&gt; &#139;right&#155;</h1>');
 charset('utf-8');
+if (ord("\t") == 9) {
 test(22,h1(escapeHTML("this is <not> \x8bright\x9b")) eq '<h1>this is &lt;not&gt; ‹right›</h1>');
+}
+else {
+test(22,h1(escapeHTML("this is <not> \x8bright\x9b")) eq '<h1>this is &lt;not&gt; »rightº</h1>');
+}
 test(23,i(p('hello there')) eq '<i><p>hello there</p></i>');
 my $q = new CGI;
 test(24,$q->h1('hi') eq '<h1>hi</h1>');