summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw9985.pp
blob: a782e48eeb8b7bcdfe1594b8a3b7f425fc4916ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ %opt=-gh }

{$mode objfpc}

uses SysUtils;

var
  DiskNum: Byte;
begin
  HaltOnNotReleased := true;
  Writeln(DiskFree(3), '/', DiskSize(3));

  { Now get disk / by AddDisk. DiskFree and DiskSize below should return
    the same (well, assuming that nothing was writeen to disk between
    calls...). }
{$ifdef unix}
  DiskNum := AddDisk('/');
{$else}
  { dos/windows/os/2 ... Still needs other cases for other OSes }
  DiskNum := 3;
{$endif}
  Writeln(DiskFree(DiskNum), '/', DiskSize(DiskNum));
  if (disksize(3)<>disksize(disknum)) then
    halt(1);
end.