fpc/tests/test/units/system/tpchlen.pp
Jonas Maebe 22aacd2a60 * return 0 for length(pchar(0)), like Kylix does (using corrected and
multi-platform version of patch in r12461, which caused the i386 version
    of fpc_pchar_length to return 0 in all cases, which used tabs, and did
    not include a test case)

git-svn-id: trunk@12464 -
2009-01-01 22:02:17 +00:00

13 lines
166 B
ObjectPascal

procedure test(p: pchar; len: longint);
begin
if (length(p)<>len) then
halt(1);
end;
begin
test(nil,0);
test(#0,0);
test('a',1);
test('hello',5);
end.