fpc/tests/test/tcpstr12.pp
paul 4cf5e36ce7 compiler:
- add TTagHashSet class descendant of THashSet with an ability to has also a LongWord value together with key
  - change TAsmData.ConstPools[] to be an indexed property to properly initialize ConstPool class, remove pool initialization from all other units
  - add ansistring constants to pool together with their encoding to distinct the same text constants with different codepage
  + test

git-svn-id: trunk@19261 -
2011-09-28 01:18:43 +00:00

19 lines
352 B
ObjectPascal

program tcpstr12;
// check that 'test' constants assigned to ansistring variables have different codepage
{$mode delphi}
type
cp866 = type AnsiString(866);
var
A: cp866;
B: AnsiString;
begin
B := 'test';
// if StringCodePage(B) <> DefaultSystemCodePage then
// halt(1);
A := 'test';
if StringCodePage(A) <> 866 then
halt(2);
end.