fpc/tests/webtbs/tw13019.pp
Jonas Maebe 9d81148986 * only convert character constants into widechar/widestring when assigned
to a widechar/widestring (compatible with constant string handling,
    mantis #13036)

git-svn-id: trunk@12588 -
2009-01-24 12:45:03 +00:00

82 lines
3.5 KiB
ObjectPascal
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

program bug13019;
{$mode objfpc}{$H+}
const expected : array[1..411] of byte = (
62, 143, 158, 162, 176, 227, 28, 124, 207, 207
, 12, 92, 26, 173, 164, 90, 1, 83, 2, 192
, 135, 21, 118, 9, 252, 191, 12, 28, 240, 51
, 254, 129, 199, 107, 15, 82, 56, 43, 82, 72
, 216, 56, 88, 92, 105, 2, 17, 36, 73, 132
, 224, 252, 173, 179, 106, 38, 224, 46, 70, 121
, 245, 37, 122, 114, 61, 10, 48, 74, 75, 83
, 24, 200, 13, 1, 128, 3, 45, 17, 196, 36
, 238, 12, 235, 57, 3, 50, 106, 192, 196, 184
, 112, 102, 0, 70, 24, 196, 4, 18, 130, 97
, 131, 55, 209, 12, 238, 127, 185, 135, 161, 222
, 139, 48, 181, 39, 215, 122, 167, 8, 123, 58
, 191, 227, 179, 37, 77, 16, 35, 32, 195, 72
, 200, 96, 37, 90, 65, 194, 198, 193, 128, 135
, 254, 195, 135, 80, 142, 222, 225, 201, 226, 35
, 244, 180, 0, 76, 4, 86, 96, 87, 235, 42
, 218, 119, 47, 163, 177, 225, 55, 170, 105, 2
, 34, 70, 204, 9, 66, 191, 73, 177, 6, 248
, 90, 36, 132, 183, 51, 101, 252, 250, 182, 129
, 225, 163, 131, 48, 75, 211, 105, 223, 46, 193
, 218, 74, 3, 132, 58, 16, 39, 149, 218, 24
, 201, 16, 166, 30, 78, 35, 77, 194, 148, 142
, 50, 7, 18, 198, 250, 215, 42, 70, 142, 141
, 166, 147, 112, 81, 133, 12, 68, 1, 54, 6
, 203, 113, 0, 136, 168, 65, 130, 224, 197, 216
, 43, 55, 171, 98, 177, 104, 11, 133, 2, 238
, 206, 77, 34, 82, 231, 203, 39, 175, 102, 187
, 64, 38, 170, 189, 3, 50, 90, 177, 222, 5
, 202, 139, 155, 78, 182, 7, 68, 228, 254, 108
, 217, 98, 244, 196, 149, 186, 101, 74, 212, 208
, 193, 170, 98, 18, 189, 19, 88, 251, 15, 131
, 225, 227, 151, 82, 173, 51, 48, 166, 214, 66
, 75, 219, 94, 167, 20, 111, 2, 182, 2, 102
, 66, 48, 49, 49, 97, 231, 231, 231, 157, 65
, 169, 84, 218, 218, 255, 58, 29, 60, 176, 137
, 185, 215, 207, 208, 212, 220, 138, 176, 185, 5
, 141, 97, 147, 75, 32, 194, 248, 175, 207, 249
, 246, 200, 190, 46, 102, 234, 101, 54, 253, 170
, 7, 21, 204, 251, 65, 56, 168, 45, 173, 255
, 1, 156, 162, 177, 64, 134, 27, 179, 141, 0
, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96
, 130);
var
i: Integer;
s: string;
begin
s :=
'>'#143#158#162#176#227#28'|'#207#207#12'\'#26#173#164'Z'#1'S'#2#192#135#21
+'v'#9#252#191#12#28#240'3'#254#129#199'k'#15'R8+RH'#216'8X\i'#2#17'$I'#132
+#224#252#173#179'j&'#224'.Fy'#245'%zr='#10'0JKS'#24#200#13#1#128#3'-'#17#196
+'$'#238#12#235'9'#3'2j'#192#196#184'pf'#0'F'#24#196#4#18#130'a'#131'7'#209#12
+#238''#185#135#161#222#139'0'#181''''#215'z'#167#8'{:'#191#227#179'%M'#16'#'
+' '#195'H'#200'`%ZA'#194#198#193#128#135#254#195#135'P'#142#222#225#201#226
+'#'#244#180#0'L'#4'V`W'#235'*'#218'w/'#163#177#225'7'#170'i'#2'"F'#204#9'B'
+#191'I'#177#6#248'Z$'#132#183'3e'#252#250#182#129#225#163#131'0K'#211'i'#223
+'.'#193#218'J'#3#132':'#16''''#149#218#24#201#16#166#30'N#M'#194#148#142'2'#7
+#18#198#250#215'*F'#142#141#166#147'pQ'#133#12'D'#1'6'#6#203'q'#0#136#168'A'
+#130#224#197#216'+7'#171'b'#177'h'#11#133#2#238#206'M"R'#231#203''''#175'f'
+#187'@&'#170#189#3'2Z'#177#222#5#202#139#155'N'#182#7'D'#228#254'l'#217'b'
+#244#196#149#186'eJ'#212#208#193#170'b'#18#189#19'X'#251#15#131#225#227#151
+'R'#173'30'#166#214'BK'#219'^'#167#20'o'#2#182#2'fB011a'#231#231#231#157'A'
+#169'T'#218#218#255':'#29'<'#176#137#185#215#207#208#212#220#138#176#185#5
+#141'a'#147'K '#194#248#175#207#249#246#200#190'.f'#234'e6'#253#170#7#21#204
+#251'A8'#168'-'#173#255#1#156#162#177'@'#134#27#179#141#0#0#0#0'IEND'#174'B`'
+#130;
for i := 1 to length(s) do
if (ord(s[i])<>expected[i]) then
begin
writeln('Different at index ',i, ', expected #', expected[i],', got #', ord(s[i]));
halt(1);
end;
end.